]> gitweb.morketsmerke.org Git - immudex-testing.git/commitdiff
Poprawienie pliku wersji oraz pliku szablonu
authorxf0r3m <jakubstasinski@protonmail.com>
Thu, 8 Jun 2023 17:11:51 +0000 (19:11 +0200)
committerxf0r3m <jakubstasinski@protonmail.com>
Thu, 8 Jun 2023 17:11:51 +0000 (19:11 +0200)
versions/100.sh
versions/template.sh

index 3f1c43254b365bac2bb43e24dca7390748db538e..b9acb01ef1335fbf6c7f65af521d3771ed727d30 100644 (file)
@@ -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;
index 56f730cb3aa6c6c41d2d76563f590a6731cf04a3..79def86f75c3834c1143a9b3ea0454986e40bb9a 100644 (file)
@@ -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;
-