]> gitweb.morketsmerke.org Git - immudex.git/commitdiff
Dostosowanie narzędzia immudex-upgrade oraz funkcji library.sh/check_distro_commit...
authorxf0r3m <jakubstasinski@protonmail.com>
Sun, 31 Dec 2023 19:01:57 +0000 (20:01 +0100)
committerxf0r3m <jakubstasinski@protonmail.com>
Sun, 31 Dec 2023 19:01:57 +0000 (20:01 +0100)
tools/immudex-upgrade
tools/library.sh

index 04138dfe6259e59e87146fd2bdc33dbac254577c..6deb3f546ff82da2117607815ac6c1c3007120d9 100755 (executable)
@@ -58,12 +58,12 @@ if [ "$1" ]; then
       echo -e "Copying immudex files to the disk...[ ${RED}FAIL${ENDCOLOR} ]";
     fi
   elif [ "$1" ] && [ "$1" = "--myversion" ]; then
-    if [ -d /tmp/immudex-testing ]; then 
-      (cd /tmp/immudex-testing && git pull > /dev/null 2>&1)
+    if [ -d /tmp/immudex ]; then 
+      (cd /tmp/immudex && git pull > /dev/null 2>&1)
     else
-      git clone https://github.com/xf0r3m/immudex-testing /tmp;
+      git clone https://github.com/xf0r3m/immudex /tmp;
     fi
-    (cd /tmp/immudex-testing && git show $(cat /run/live/medium/live/version))
+    (cd /tmp/immudex && git show $(cat /run/live/medium/live/version))
   else
     help;
     exit 1;
index b06fb76d88f11bd0f222ff486d35fd18fca893f9..2e50210d727bdb5b7985cae594d637f3efdac4a6 100755 (executable)
@@ -3,8 +3,10 @@
 function get_debian_branch() {
   if grep -q 'trixie' /etc/os-release; then
     echo "testing";
-  else
+  elif grep -q 'bookworm' /etc/os-release; then
     echo "stable";
+  else
+    echo "oldstable";
   fi
 }
 
@@ -21,14 +23,14 @@ function check_distro_commit() {
   versionFile="/run/live/medium/live/version";
   if [ -f $versionFile ]; then
     localVersion=$(cat $versionFile);
-    if [ -d /tmp/immudex-testing ]; then
-      $(cd /tmp/immudex-testing && git pull -q);
+    if [ -d /tmp/immudex ]; then
+      $(cd /tmp/immudex && git pull -q);
     else
-      git clone -q https://github.com/xf0r3m/immudex-testing /tmp/immudex-testing;
+      git clone -q https://github.com/xf0r3m/immudex /tmp/immudex;
     fi
-    latestVersion=$(cd /tmp/immudex-testing && git log --pretty=oneline | head -1 | cut -d " " -f 1);
+    latestVersion=$(cd /tmp/immudex && git log --pretty=oneline | head -1 | cut -d " " -f 1);
     if [ "$1" ] && [ "$1" == "--print" ]; then
-      echo "$(cd /tmp/immudex-testing && git log ${localVersion}..${latestVersion})";
+      echo "$(cd /tmp/immudex && git log ${localVersion}..${latestVersion})";
     fi
     if [ "$localVersion" = "$latestVersion" ]; then
       return 0;