]> gitweb.morketsmerke.org Git - immudex-lhe.git/commitdiff
Dostosowanie skryptu 'immudex_rebuildenv' do immudex-lhe
authorxf0r3m <jakubstasinski@protonmail.com>
Thu, 27 Jul 2023 17:39:47 +0000 (19:39 +0200)
committerxf0r3m <jakubstasinski@protonmail.com>
Thu, 27 Jul 2023 17:39:47 +0000 (19:39 +0200)
immudex_rebuildenv

index dd11d23e4e551a8e82e7af1e38a399eacde821f3..1dfaf3ba40e960f0ddbd4600f9e96c97d03b7034 100755 (executable)
@@ -16,6 +16,9 @@ if [ "$1" ]; then
   elif echo $filename | grep -q 'immudex-niko'; then
     branch="immudex";
     branchAltName="niko"
+  elif echo $filename | grep -q 'immudex-lhe'; then
+    branch="immudex-lhe";
+    branchAltName="lhe";
   else
     branch="immudex";
     branchAltName="stable";
@@ -28,17 +31,17 @@ if [ "$1" ]; then
   fi
   echo "-== Starting immudex_rebuildenv $(date) ==-" >> immudex_rebuildenv.log;
   echo -n "Creating necessary directory structure..."; 
-  mkdir -pv build/${branchAltName}/${branch}/${arch}/{chroot,staging,tmp} >> immudex_rebuildenv.log 2>&1;
+  mkdir -pv build/${branchAltName}/${branch}/${arch}/{chroot,staging} >> immudex_rebuildenv.log 2>&1;
   if [ $? -eq 0 ]; then echo -e "[ ${GREEN}OK${ENDCOLOR} ]"; fi
  
   rootPath="build/${branchAltName}";
-  echo -n "Fetching immudex_build script...";
-  wget https://github.com/xf0r3m/${branch}/raw/main/immudex_build -O build/${branchAltName}/immudex_build >> immudex_rebuildenv.log 2>&1;
-  if [ $? -eq 0 ]; then echo -e "[ ${GREEN}OK${ENDCOLOR} ]"; fi
+  #echo -n "Fetching immudex_build script...";
+  #wget https://github.com/xf0r3m/${branch}/raw/main/immudex_build -O build/${branchAltName}/immudex_build >> immudex_rebuildenv.log 2>&1;
+  #if [ $? -eq 0 ]; then echo -e "[ ${GREEN}OK${ENDCOLOR} ]"; fi
   
-  echo -n "Setting execution permissions for immudex_build script..."
-  chmod +x build/${branchAltName}/immudex_build;
-  if [ $? -eq 0 ]; then echo -e "[ ${GREEN}OK${ENDCOLOR} ]"; fi
+  #echo -n "Setting execution permissions for immudex_build script..."
+  #chmod +x build/${branchAltName}/immudex_build;
+  #if [ $? -eq 0 ]; then echo -e "[ ${GREEN}OK${ENDCOLOR} ]"; fi
 
   
   echo -n "Creating /tmp/iso directory...";
@@ -60,17 +63,17 @@ if [ "$1" ]; then
   sudo rmdir -v /tmp/iso >> immudex_rebuildenv.log 2>&1;
   if [ $? -eq 0 ]; then echo -e "[ ${GREEN}OK${ENDCOLOR} ]"; fi
 
-  echo -n "Creating grub-standalone.cfg file...";
-  cat > ${rootPath}/${branch}/${arch}/tmp/grub-standalone.cfg <<EOF
-search --set=root --file /DEBIAN
-set prefix=($root)/boot/grub
-configfile /boot/grub/grub.cfg
-EOF
-  if [ $? -eq 0 ]; then echo -e "[ ${GREEN}OK${ENDCOLOR} ]"; fi
+  #echo -n "Creating grub-standalone.cfg file...";
+  #cat > ${rootPath}/${branch}/${arch}/tmp/grub-standalone.cfg <<EOF
+#search --set=root --file /DEBIAN
+#set prefix=($root)/boot/grub
+#configfile /boot/grub/grub.cfg
+#EOF
+  #if [ $? -eq 0 ]; then echo -e "[ ${GREEN}OK${ENDCOLOR} ]"; fi
   
-  echo "-== Print grub-standalone.cfg $(date) ==-" >> immudex_rebuildenv.log;
-  cat ${rootPath}/${branch}/${arch}/tmp/grub-standalone.cfg >> immudex_rebuildenv.log 2>&1;
-  echo "-== End Print ==-" >> immudex_rebuildenv.log;
+  #echo "-== Print grub-standalone.cfg $(date) ==-" >> immudex_rebuildenv.log;
+  #cat ${rootPath}/${branch}/${arch}/tmp/grub-standalone.cfg >> immudex_rebuildenv.log 2>&1;
+  #echo "-== End Print ==-" >> immudex_rebuildenv.log;
   
   echo -n "Unpacking squashfs archive...";
   sudo unsquashfs -f -d ${rootPath}/${branch}/${arch}/chroot ${rootPath}/${branch}/${arch}/staging/live/filesystem.squashfs >> immudex_rebuildenv.log 2>&1;