From: xf0r3m Date: Thu, 8 Jun 2023 17:11:51 +0000 (+0200) Subject: Poprawienie pliku wersji oraz pliku szablonu X-Git-Url: https://gitweb.morketsmerke.org/?a=commitdiff_plain;h=da9c6d2e4c0932f648820920e5cc46972fd9a1d6;p=immudex-testing.git Poprawienie pliku wersji oraz pliku szablonu --- diff --git a/versions/100.sh b/versions/100.sh index 3f1c432..b9acb01 100644 --- a/versions/100.sh +++ b/versions/100.sh @@ -3,6 +3,7 @@ set -e VERSION=$(echo $0 | cut -d "." -f 1); +#export $VERSION; if [ ! "$1" ]; then exit 1; fi if [ ! -d ~/immudex-testing ]; then exit 1; fi @@ -19,6 +20,7 @@ if [ -x /usr/bin/git ]; then GIT_SSH_COMMAND="ssh -p 2022" git clone ssh://git@s else apt install git -y && GIT_SSH_COMMAND="ssh -p 2022" git clone ssh://git@searx.morketsmerke.org/~/immudex-testing.git; fi +export VERSION=$VERSION; source ~/immudex-testing/versions/template.sh; echo "deb http://deb.debian.org/debian/ bookworm main" > /etc/apt/sources.list; diff --git a/versions/template.sh b/versions/template.sh index 56f730c..79def86 100644 --- a/versions/template.sh +++ b/versions/template.sh @@ -26,7 +26,7 @@ function recreate_users() { cp -rvv /etc/skel/.??* /home/user; cp -rvv /etc/skel/?* /home/user; mkdir /home/user/.local; - tar -xvf ~/immudex-testing/files/017/local_user.tar -C /home/user/.local; + tar -xvf ~/immudex-testing/files/${VERSION}/local_user.tar -C /home/user/.local; rm /home/user/.face; cp /usr/share/images/desktop-base/immudex_xfce_greeter_logo.png /home/user/.face; chown -R user:user /home/user; @@ -38,7 +38,7 @@ function recreate_users() { cp -rvv /etc/skel/.??* /home/xf0r3m; cp -rvv /etc/skel/?* /home/xf0r3m; mkdir /home/xf0r3m/.local; - tar -xvf ~/immudex-testing/files/017/local_xf0r3m.tar -C /home/xf0r3m/.local; + tar -xvf ~/immudex-testing/files/${VERSION}/local_xf0r3m.tar -C /home/xf0r3m/.local; rm /home/xf0r3m/.face; cp /usr/share/images/desktop-base/immudex_xfce_greeter_logo.png /home/xf0r3m/.face; chown -R xf0r3m:xf0r3m /home/xf0r3m; @@ -69,15 +69,12 @@ function set_default_wallpaper() { } function set_notifier_packages() { - cp -vv ~/immudex-testing/files/011/Notifier\ -\ packages.desktop /home/xf0r3m/.config/autostart; + cp -vv ~/immudex-testing/files/${VERSION}/Notifier\ -\ packages.desktop /home/xf0r3m/.config/autostart; chown xf0r3m:xf0r3m /home/xf0r3m/.config/autostart/Notifier\ -\ packages.desktop; } function set_xfce4_notes_autostart() { - cp -vv ~/immudex-testing/files/024/autostart-x4notes.desktop /home/xf0r3m/.config/autostart; + cp -vv ~/immudex-testing/files/${VERSION}/autostart-x4notes.desktop /home/xf0r3m/.config/autostart; chown xf0r3m:xf0r3m /home/xf0r3m/.config/autostart/autostart-x4notes.desktop; } -VERSION=$(echo $0 | cut -d "." -f 1); -if [ ! "$VERSION" ]; then echo -e "\e[31mUpdate failed!\e[0m"; exit 1; fi; -