-
Notifications
You must be signed in to change notification settings - Fork 0
/
developer-undo.fedora.sh
executable file
·267 lines (235 loc) · 8.01 KB
/
developer-undo.fedora.sh
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
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
#!/bin/bash
me=`basename $0`
# region common
postinstall="generated.md"
maindir=""
if [ -f api.rc ]; then
maindir="."
elif [ -f ../api.rc ]; then
maindir=".."
elif [ -f ../../api.rc ]; then
maindir="../.."
elif [ -f ../../../api.rc ]; then
maindir="../../.."
fi
if [ ! -z "$maindir" ]; then
source $maindir/api.rc
postinstall="$maindir/$_POSTINSTALL_NAME"
else
echo "WARNING: api.rc cannot be found in `pwd` nor up to ../../.."
echo " tips will be placed in `pwd`/$postinstall instead."
fi
touch $postinstall
# endregion common
cat >> $postinstall <<EOF
# Post Install Instructions
(This file was generated by $me, so
DO NOT EDIT THIS FILE)
EOF
echo "You must do the following manual steps to enable newly-installed features:" >> $postinstall
echo " - [ ] Enable spell check plugin in Geany's \"Tools,\" \"Plugin manager\" window." >> $postinstall
#echo "(This file was generated by $me, so" > $postinstall
#echo "DO NOT EDIT THIS FILE)" >> $postinstall
#see also $HOME/git/integratoredu/data/units/0/tm/files/(system)/iedu-mps-hourly
# region home server
# * faster server if you have a home server:
# su -c 'echo "192.168.1.5 poikilos.dyndns.org" >> /etc/hosts'
# endregion home server
# region local git website without database
# (see <https://www.git-scm.com/docs/git-instaweb/1.5.5>)
dnf -y install git-instaweb
# (which also gets: lighthttpd lighttpd-filesystem)
cat >> $postinstall <<EOF
## git-instaweb
(view local git repos using your web browser; not cloned repos--see
make-localhost-git-Bucket_Game.sh)
* cd to your git directory then run git instaweb such as
\`\`\`bash
cd /home/owner/localrepos/Bucket_Game.git
git instaweb
\`\`\`
EOF
# endregion local git website without database
echo "You must install everyone.sh files first, or the repositories or programs may be missing."
. /etc/os-release
PACKAGE_TYPE=rpm
INSTALL_CMD=="dnf -y install"
if [ ! -f "`command -v dnf`" ]; then
if [ ! -f "`command -v yum`" ]; then
if [ -f "`command -v apt`" ]; then
INSTALL_CMD=="apt -y install"
PACKAGE_TYPE=deb
elif [ -f "`command -v apt-get`" ]; then
INSTALL_CMD=="apt-get -y install"
PACKAGE_TYPE=deb
fi
else
INSTALL_CMD="yum -y install"
fi
fi
CODEBLOCKS_PKG=codeblocks
if [ "@$VERSION_CODENAME" = "@buster" ]; then
CODEBLOCKS_PKG=
echo "* You are using buster and codeblocks is very old and crashy on that."
if [ -f "`command -v flatpak`" ]; then
# ^ Use flatpak if Debian 10 it is really old and crashes.
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak install -y flathub org.codeblocks.codeblocks
# ^ Use system rather than `--user` for *everything* in linux-preinstall to avoid doubling up on dependencies.
if [ $? -ne 0 ]; then
echo "Error: 'flatpak install -y flathub org.codeblocks.codeblocks' failed."
exit 1
fi
else
echo " Error: flatpak is not installed."
fi
fi
NEXTCLOUD_CLIENT_PKG=nextcloud-client
GEANY_SPELL_PKG=geany-plugins-spellcheck
# E: Unable to locate package ladspa-cmt-plugins
# ^ Debian 10
PY2_PIL_PKG=python2-pillow
AVIDEMUX_PKG=avidemux
# E: Package 'avidemux' has no installation candidate
# ^ Debian 10
QT_CREATOR_PKG=qt-creator
PY2_PYGAME_PKG=python2-pygame
PROJECTM_PA_PKG=projectM-pulseaudio
ECLIPSE_JDT_PKG=eclipse-jdt
cat > /dev/null <<END
# TODO: Make package variables for stuff below too to improve compatibility with other distros.
_PKG=icedtea-web
_PKG=shotcut
_PKG=chromium-libs-media-freeworld
_PKG=fuse-exfat
_PKG=unetbootin
_PKG=gimp-elsamuko
_PKG=gimp-wavelet-denoise-plugin
_PKG=gimp-paint-studio
_PKG=gimp-lqr-plugin
_PKG=gimp-normalmap
_PKG=GREYCstoration-gimp
STAR_PKG=star
# E: Package 'star' has no installation candidate
# ^ Debian 10
_PKG=ladspa-cmt-plugins
_PKG=ladspa-autotalent-plugins
_PKG=ladspa-zam-plugins
_PKG=ladspa-rev-plugins
_PKG=PersonalCopy-Lite-soundfont
_PKG=ardour5
_PKG=remarkable
_PKG=discord
_PKG=git-credential-libsecret
_PKG=gstreamer-ffmpeg
_PKG=gmic-gimp
END
skip_msg(){
echo "* skipping \"$1\" since its package name is unknown on your package system ($PACKAGE_TYPE)"
}
if [ "@$PACKAGE_TYPE" = "@deb" ]; then
GEANY_SPELL_PKG=geany-plugin-spellcheck
NEXTCLOUD_CLIENT_PKG=nextcloud-desktop
PY2_PIL_PKG=python-pillow
AVIDEMUX_PKG=
skip_msg avidemux
QT_CREATOR_PKG=qtcreator
PY2_PYGAME_PKG=python-pygame
PROJECTM_PA_PKG=projectm-pulseaudio
ECLIPSE_JDT_PKG=
echo "* skipping \"eclipse-jdt\" since the package is not in Debian 10 and later and an automated install method is unknown on Debian 10 or later. See <https://linuxhint.com/install_eclipse_ide_debian_10/>"
STAR_PKG=
skip_msg star
# error "=dnf" not found on line 165
fi
dnf -y remove blender $NEXTCLOUD_CLIENT_PKG inkscape obs-studio keepassxc filezilla avidemux $CODEBLOCKS_PKG $QT_CREATOR_PKG mypaint krita \
kate lmms vinagre scantailor librecad freecad gedit hexchat ghex gucharmap tiled fontforge frei0r-plugins $PROJECTM_PA_PKG eclipse-jdt \
icedtea-web maven shotcut unetbootin \
$STAR_PKG \
sloccount \
icoutils \
ladspa-cmt-plugins \
ladspa-autotalent-plugins \
ladspa-zam-plugins \
ladspa-rev-plugins \
PersonalCopy-Lite-soundfont \
ardour5 \
scribus \
discord \
icoutils \
pandoc \
sqlitebrowser \
python3-pycodestyle \
sublime-text \
pdfjam \
;
# ^ Don't put any comment mark above or it will comment the rest of the packages!
#autoconf (including autoreconf etc):
dnf -y groupremove "C Development Tools and Libraries"
dnf -y groupremove "Development Tools"
gem uninstall wayback_machine_downloader
cat <<END
* Potential dependencies will only be unmarked (removing them may remove other things, but running autoremove will not):
python python3-pillow $PY2_PIL_PKG $PY2_PYGAME zlib libpng python2-setuptools python2-virtualenv python2-numpy ocl-icd opencl-headers ruby
END
dnf mark remove -y \
python python3-pillow $PY2_PIL_PKG $PY2_PYGAME zlib libpng python2-setuptools python2-virtualenv python2-numpy ocl-icd opencl-headers ruby
cat <<END
* Unmarking Kivy dependencies:
python-devel ffmpeg-libs SDL2-devel SDL2_image-devel SDL2_mixer-devel SDL2_ttf-devel portmidi-devel libavdevice libavc1394-devel zlibrary-devel ccache mesa-libGL mesa-libGL-devel \
python3-pip python2-pip xclip \
make gcc-c++ gdb qt5*-devel \
;
END
dnf mark remove -y \
python-devel ffmpeg-libs SDL2-devel SDL2_image-devel SDL2_mixer-devel SDL2_ttf-devel portmidi-devel libavdevice libavc1394-devel zlibrary-devel ccache mesa-libGL mesa-libGL-devel \
python3-pip python2-pip xclip \
make gcc-c++ gdb qt5*-devel \
;
echo "* running dnf autoremove to remove unused dependencies..."
dnf autoremove -y
cat <<END
* Not removing non-developer packages (keeping git and git-cola for maintenance):
darktable geany $GEANY_SPELL_PKG speedcrunch vlc mpv catfish meld gxmms2 qdirstat redshift \
plasma-applet-redshift-control exfat-utils chromium-libs-media-freeworld fuse-exfat \
gimp-elsamuko \
gimp-resynthesizer \
gimp-wavelet-denoise-plugin \
gimp-paint-studio \
gimp-lqr-plugin \
gimp-normalmap \
gimp-lensfun \
gimp-data-extras \
GREYCstoration-gimp \
gmic-gimp \
rhythmbox \
libreoffice \
remarkable \
git \
git-credential-libsecret \
gstreamer-ffmpeg \
gnome-terminal \
screen \
libsecret \
php \
ffmpeg \
libav \
dnf-plugins-core \
brave-keyring brave-browser \
git-cola \
;
END
#echo "* removing gnome plugins:"
#echo " redshift-gtk"
#dnf remove -y redshift-gtk
echo "* not removing non-developer non-kde packages:"
echo " redshift-gtk"
echo "* not removing repos:"
echo " https://brave-browser-rpm-release.s3.brave.com/x86_64/"
echo " https://download.sublimetext.com/rpm/stable/x86_64/sublime-text.repo"
## see also (installed as dep)
# python3-mutagen (python module to handle audio meta-data)
if [ -d "$HOME/palettes" ]; then
rmdir "$HOME/palettes"
fi
echo "* not removing the nonet user."