Skip to content

Commit 468fa79

Browse files
authored
Deployment of Skyscraper bash completion file with scriptmodule. (#3865)
1 parent 3c59970 commit 468fa79

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

scriptmodules/supplementary/skyscraper.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ function _config_files_skyscraper() {
6666
'peas.json'
6767
'platforms_idmap.csv'
6868
'resources'
69+
'supplementary/bash-completion/Skyscraper.bash'
6970
'screenscraper_platforms.json'
7071
'tgdb_developers.json'
7172
'tgdb_genres.json'
@@ -217,13 +218,12 @@ function configure_skyscraper() {
217218
}
218219

219220
function _init_config_skyscraper() {
220-
221221
local config_files=($(_config_files_skyscraper))
222222

223223
# assume new(er) install
224224
mkdir -p .pristine_cfgs
225225
for cf in "${config_files[@]}"; do
226-
bn=${cf#*/} # cut off cache/
226+
bn=${cf##*/} # cut off all folders
227227
if [[ -e "$md_inst/$bn" ]]; then
228228
cp -rf "$md_inst/$bn" ".pristine_cfgs/"
229229
rm -rf "$md_inst/$bn"
@@ -275,6 +275,11 @@ function _init_config_skyscraper() {
275275
# Create the cache folder and add the sample 'priorities.xml' file to it
276276
mkUserDir "$scraper_conf_dir/cache"
277277
cp -f "$md_inst/.pristine_cfgs/priorities.xml.example" "$scraper_conf_dir/cache"
278+
279+
# Deploy programmable completion script
280+
mkUserDir "$home/.bash_completion.d"
281+
cp -f "$md_inst/.pristine_cfgs/Skyscraper.bash" "$home/.bash_completion.d"
282+
chown $user:$user "$home/.bash_completion.d/Skyscraper.bash"
278283
}
279284

280285
# Scrape one system, passed as parameter

0 commit comments

Comments
 (0)