@@ -77,7 +77,24 @@ function _config_files_skyscraper() {
77
77
}
78
78
79
79
function remove_skyscraper() {
80
+ local ret
81
+ local msg
82
+
83
+ # Prompt for cache clearing
84
+ msg=" \nRemove also Skyscraper's cache data for all platforms:"
85
+ msg+=" \nvideos, screenshots, descriptions, ... ?"
86
+ msg+=" \n\nThis will only remove files in ~/.skyscraper/cache/."
87
+ msg+=" \n\nIf unsure select 'No'."
88
+ dialog --clear --colors --defaultno --title " Remove Skyscraper" --yesno " $msg " 12 60 2>&1 > /dev/tty
89
+ ret=$?
90
+
91
+ [[ $ret -eq 0 ]] && _purge_skyscraper
92
+
93
+ # Remove possible per-user deployment introduced with v3.9.3
80
94
rm -f " $home /.bash_completion.d/Skyscraper.bash"
95
+
96
+ rm -f " /etc/bash_completion.d/Skyscraper.bash"
97
+ rm -f " /usr/local/bin/Skyscraper"
81
98
}
82
99
83
100
# Get the location of the cached resources folder. In v3+, this changed to 'cache'.
@@ -170,11 +187,6 @@ function _list_systems_skyscraper() {
170
187
find -L " $romdir /" -mindepth 1 -maxdepth 1 -type d -not -empty | sort -u
171
188
}
172
189
173
- function remove_skyscraper() {
174
- # On removal of the package, purge the cache
175
- _purge_skyscraper
176
- }
177
-
178
190
function configure_skyscraper() {
179
191
if [[ " $md_mode " == " remove" ]]; then
180
192
return
@@ -281,9 +293,12 @@ function _init_config_skyscraper() {
281
293
cp -f " $md_inst /.pristine_cfgs/priorities.xml.example" " $scraper_conf_dir /cache"
282
294
283
295
# Deploy programmable completion script
284
- mkUserDir " $home /.bash_completion.d"
285
- cp -f " $md_inst /.pristine_cfgs/Skyscraper.bash" " $home /.bash_completion.d"
286
- chown $user :$user " $home /.bash_completion.d/Skyscraper.bash"
296
+ cp -f " $md_inst /.pristine_cfgs/Skyscraper.bash" " /etc/bash_completion.d/"
297
+ # Ease of use but also needed for proper completion
298
+ ln -sf " $md_inst /Skyscraper" " /usr/local/bin/Skyscraper"
299
+
300
+ # Remove possible per-user deployment introduced with v3.9.3
301
+ rm -f " $home /.bash_completion.d/Skyscraper.bash"
287
302
}
288
303
289
304
# Scrape one system, passed as parameter
0 commit comments