forked from momor666/up-debian_ubuntu_update_tool
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathup
executable file
·235 lines (163 loc) · 5.97 KB
/
up
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
#!/bin/bash
# Up -- Debian/Ubuntu Update Tool (Version 1.2)
# Advanced command to fully update system: "up" Adding the option "--clean" will
# remove orphaned packages and auto-clean the apt cache. (January, 2018)
# Adding the option "--remove" will just reomve orphaned packages.
# By Joe Collins www.ezeelinux.com (GNU/General Public License version 2.0)
#
# ...And way we go!
# Check for less utility and install if needed:
dpkg -l | grep -qw less || sudo apt install less -yyq
# Set BASH to quit script and exit on errors:
set -e
# Functions:
new() {
if [ ! -d "$HOME/Documents/repos" ]; then
mkdir "$HOME/Documents/repos"
fi
export REPDIR="$HOME/Documents/repos"
if [ ! -d "$HOME/Documents/proj" ]; then
mkdir "$HOME/Documents/proj"
fi
export PROJDIR="$HOME/Documents/proj"
#kxstudio packages
(
sudo apt install -yy wget apt-transport-https gpgv
cd $REPDIR
)
#sfizz
# (
# echo 'deb http://download.opensuse.org/repositories/home:/sfztools:/sfizz/xUbuntu_20.04/ /' | sudo tee /etc/apt/sources.list.d/home:sfztools:sfizz.list
# curl -fsSL https://download.opensuse.org/repositories/home:sfztools:sfizz/xUbuntu_20.04/Release.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/home:sfztools:sfizz.gpg > /dev/null
#
# cd $PROJDIR
#
# if [ ! -d "Virtual-Playing-Orchestra3" ]; then
# wget http://virtualplaying.com/go/virtual-playing-orchestra-v3-2-1-1-performance-scripts
# mv virtual-playing-orchestra-v3-2-1-1-performance-scripts virtual-playing-orchestra-v3-2-1-1-performance-scripts.zip
# unzip virtual-playing-orchestra-v3-2-1-1-performance-scripts.zip
# rm -rf virtual-playing-orchestra-v3-2-1-1-performance-scripts.zip
# fi
# )
wget https://launchpad.net/~kxstudio-debian/+archive/kxstudio/+files/kxstudio-repos_10.0.3_all.deb
sudo dpkg -i kxstudio-repos_10.0.3_all.deb
rm -rf kxstudio-repos_10.0.3_all.deb
#Remove kxstudio conflicts
#sudo apt purge -yy hydrogen kxstudio-recommended-graphics kxstudio-meta-audio-plugins-lv2
remove
clean
update
sudo snap install cmake --edge --classic
sudo apt -yy install luppp adlplug surge regrader soundconverter aliki tetraproc iem-plugin-suite-vst libjack-jackd2-dev portaudio19-dev libasound2-dev libz-dev libglibmm-2.4-1v5 gparted ntp synaptic emacs kate octave build-essential g++ pkg-config llvm clang git liblilv-dev libsndfile1-dev libfftw3-dev libusb-1.0-0-dev libudev-dev libmicrohttpd-dev libcairo2-dev libsuil-dev curl libglu1-mesa-dev openssh-server \
kxstudio-meta-audio-plugins kxstudio-meta-audio-plugins-collection kxstudio-meta-audio-plugins-vst kxstudio-recommended-video kxstudio-lv2-extensions
# kxstudio specific packages on the last line
}
update() {
echo "Starting full system update..."
sudo snap refresh
sudo apt update
sudo apt full-upgrade -yy
}
clean() {
echo "Removing apt cache packages that can no longer be downloaded..."
sudo apt autoclean
}
remove() {
echo "Removing orpahned packages..."
sudo apt autoremove -yy
}
leave() {
echo "--------------------"
echo "- Update Complete! -"
echo "--------------------"
exit
}
up_help() {
less << _EOF_
Up -- Debian/Ubuntu Update Tool (Version 1.2) -help
Up is a tool that automates the update procedure for Debian and Ubuntu based
Linux systems.
Press "q" to exit this Help page.
Commands:
up = full system update.
Running "up" with no options will update the apt cache and then perform a
full distribution update automatically.
up --remove = full system update with orphaned packages removed.
up --clean = full system update with full cleanup.
Adding the "--clean" option will invoke the apt commands to search for and
remove locally cached packages that are no longer in the repositories and
remove orphaned packages that are no longer needed by programs.
The "--remove" option only removes orphaned packages, leaving the apt cache
alone.
up --help = shows this help page.
By Joe Collins www.ezeelinux.com (GNU/General Public License version 2.0)
Disclaimer:
THIS SOFTWARE IS PROVIDED BY EZEELINUX “AS IS” AND ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
EVENT SHALL EZEELINUX BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
_EOF_
}
# Execution.
# Tell 'em who we are...
echo "Up -- Debian/Ubuntu Update Tool (Version 1.2)"
# Setup for fist time use:
if [ "$1" == "--install" ]; then
if [ ! -d "$HOME/bin" ]; then
mkdir $HOME/bin
echo "up will be installed on next log in, run it with --install again to update when the script itself can be updated"
fi
cp ${pwd}up $HOME/bin
cp ${pwd}batchmp3_320 $HOME/bin
chmod +x $HOME/bin/batchmp3_320
cp ${pwd}renderbinauralUHJ $HOME/bin
chmod +x $HOME/bin/renderbinauralUHJ
cp ${pwd}renderbinUHJ.sc $HOME/bin
cp ${pwd}repos $HOME/bin
chmod +x $HOME/bin/repos
cp ${pwd}vcvPlugs $HOME/bin
chmod +x $HOME/bin/vcvPlugs
new
cd ${pwd}bform2ald/source/
make clean
make
mv makemulti $HOME/bin
mv bform2ald $HOME/bin
leave
fi
# Update and clean:
if [ "$1" == "--clean" ]; then
update
remove
clean
leave
fi
# Update and remove orphaned packages:
if [ "$1" == "--remove" ]; then
update
remove
leave
fi
if [ "$1" == "--help" ]; then
up_help
exit
fi
# Call the "repos" script
if [ "$1" == "--repos" ]; then
update
repos "$2" "$3"
leave
fi
# Check for invalid argument
if [ -n "$1" ]; then
echo "Up Error: Invalid argument. Try 'up --help' for more info." >&2
exit 1
fi
update
leave