+ wp (wallpaper) support

This commit is contained in:
tuxwarrior
2024-04-30 20:41:12 -05:00
parent fb954b8fa3
commit b892d1ec35
2 changed files with 24 additions and 5 deletions

View File

@@ -5,12 +5,14 @@
echo "<< 99_download.sh >>" echo "<< 99_download.sh >>"
user=poq user=poq
base_dots_url=https://git.mz.fo/fro/lnx-arch/raw/branch/master
targz_dots_url=https://git.mz.fo/fro/lnx-arch/archive/master.tar.gz
clone_trg=/tmp clone_trg=/tmp
targz_dots_url=https://git.mz.fo/fro/lnx-arch/archive/master.tar.gz
dots_trg=${clone_trg}/lnx-arch/dots dots_trg=${clone_trg}/lnx-arch/dots
targz_wp_url=https://gitlab.com/pqq/wallpaper/-/archive/main/wallpaper-main.tar.gz
wp_trg=${clone_trg}/lnx-arch/dots
if [ "$EUID" -ne 0 ] if [ "$EUID" -ne 0 ]
then echo "error: run as 'root'" then echo "error: run as 'root'"
@@ -63,6 +65,13 @@ if [ ${operation} == "dots" ] ; then
chown ${user}:${user} ${target_file_path} chown ${user}:${user} ${target_file_path}
ls -al ${target_file_path} ls -al ${target_file_path}
fi
# download wallpapers from repo
if [ ${operation} == "wp" ] ; then
echo "***** ${operation} *****"
download_repo ${targz_wp_url}
tree ${clone_trg}/wallpapers
fi fi

View File

@@ -31,7 +31,7 @@ fi
this_file_name=`basename "$0"` this_file_name=`basename "$0"`
if [ $# -lt 1 ]; then if [ $# -lt 1 ]; then
echo "usage: '$this_file_name { dots | uf / upd-full [host] | sw / software [host] | us / upd-self }'" echo "usage: '$this_file_name { dots | uf / upd-full [host] | sw / software [host] | us / upd-self | wp }'"
exit 1 exit 1
fi fi
@@ -41,7 +41,7 @@ parameter_2=$3
shopt -s extglob shopt -s extglob
case $operation in case $operation in
!(dots|uf|upd-full|sw|software|us|upd-self)) !(dots|uf|upd-full|sw|software|us|upd-self|wp))
echo "error: unknown operation '$operation'" echo "error: unknown operation '$operation'"
exit exit
;; ;;
@@ -147,6 +147,16 @@ if [ $operation == "uf" ] || [ $operation == "upd-full" ] ; then
fi fi
shopt -u extglob shopt -u extglob
# update wallpapers
shopt -s extglob
if [ $operation == "wp" ] ; then
execute_script 99_download.sh wp
fi
shopt -u extglob
# update and rebuild (all) without hostname # update and rebuild (all) without hostname
#shopt -s extglob #shopt -s extglob
#if [ $operation == "ur" ] || [ $operation == "upd-rebuild" ] ; then #if [ $operation == "ur" ] || [ $operation == "upd-rebuild" ] ; then