GREEN="\e[32m";
RED="\e[31m";
+YELLOW="\e[33m";
ENDCOLOR="\e[0m";
SYSTEM_CC=$(echo $LANG | cut -c 1-2);
}
function version() {
- echo "immudex-pl 1.0";
+ echo "immudex-pl 1.0-1";
echo;
echo "Copyright (C) 2026 morketsmerke.org";
echo "This is free software; see the source for copying conditions. There is NO";
echo "Getting high quality audio stream format...";
audio=$(yt-dlp --list-formats $link 2>/dev/null | grep 'audio only' | grep "high" | sed -n '1p' | awk '{printf $1}');
if [ ! "$audio" ]; then
- echo "No audio stream found...[ ${RED}DEAD${ENDCOLOR} ]";
- exit 1;
+ echo -e "No audio stream found...[ ${RED}FAILED${ENDCOLOR} ]";
+ echo -e "There is no separate audio stream...[ ${YELLOW}FINE${ENDCOLOR} ]";
+ #exit 1;
else
echo -e "Getting high quality audio stream format...[ ${GREEN}OK${ENDCOLOR} ]";
fi
else
echo -e "Getting audio format based on your locales...[ ${GREEN}OK${ENDCOLOR} ]";
fi
- fmat="--ytdl-format=${video}+${audio}";
+ if [ ! "$audio" ]; then
+ fmat="--ytdl-format=${video}";
+ else
+ fmat="--ytdl-format=${video}+${audio}";
+ fi
echo "MPV is starting up...";
mpv $fmat $link > /dev/null 2>&1 & MPVPID=$!
echo "GB. It would happens. More space in this partition is also needed for";
echo "upgrades tasks. So if your image is bigger than 2 GiB, you need to ";
echo "change size of this partition before you start instalation.";
- echo "Recomended size is 3 times the image size.";
+ echo "Recomended size is 3 times the image size. The partition size can be";
+ echo "changed via below described option.";
echo "This script requires superuser (root) privileges.";
echo;
- echo "Usage: immudex-install [--help] [--version]";
+ echo "Usage: immudex-install [--partition-size=3G] [--help] [--version]";
echo;
echo "Options:";
- echo " --help Print this message.";
- echo " --version Print information about version, author and copyrights.";
+ echo " --partition-size=3G This option change a partition size with immudex image. Usefull for custom builds. By default it's 3GB.";
+ echo " --help Print this message.";
+ echo " --version Print information about version, author and copyrights.";
echo;
echo "Examples:";
- echo " immudex-install Standard execution, instalation immudex LiveCD on computer hard disk.";
- echo " immudex-install --help Print this message.";
- echo " immudex-install --version Print information about version, author and copyrights.";
+ echo " immudex-install Standard execution, instalation immudex LiveCD on computer hard disk.";
+ echo " immudex-install --partition-size=6G Run install script for custom immudex image build.";
+ echo " immudex-install --help Print this message.";
+ echo " immudex-install --version Print information about version, author and copyrights.";
echo;
echo "Report bugs to <xf0r3m@gmail.com>";
}
function version() {
- echo "immudex-install 1.0";
+ echo "immudex-install 1.1";
echo;
echo "Copyright (C) 2026 morketsmerke.org";
echo "This is free software; see the source for copying conditions. There is NO";
help;
elif [ "$1" = "--version" ]; then
version;
+ elif $(echo $1 | grep -q "--partition-size"); then
+ idxPartSize=$(echo $1 | cut -d "=" -f2);
+ else
+ idxPartSize="3G";
fi
else
if [ $UID -ne 0 ]; then
parted /dev/$disk mklabel msdos > /dev/null 2>&1;
parted /dev/$disk mkpart primary 1 101M > /dev/null 2>&1;
parted /dev/$disk set 1 boot on > /dev/null 2>&1;
- parted /dev/$disk mkpart primary 101M 3G > /dev/null 2>&1;
+ parted /dev/$disk mkpart primary 101M $idxPartSize > /dev/null 2>&1;
if $(echo $disk | egrep -qo "mmc|nvme"); then disk="${disk}p"; fi
dd if=/dev/zero bs=1M of=/dev/$disk count=1 2> /dev/null
parted /dev/$disk mklabel msdos > /dev/null 2>&1;
- parted /dev/$disk mkpart primary 1 3G > /dev/null 2>&1;
+ parted /dev/$disk mkpart primary 1 $idxPartSize > /dev/null 2>&1;
parted /dev/$disk set 1 boot on > /dev/null 2>&1;
if $(echo $disk | egrep -qo "mmc|nvme"); then disk="${disk}p"; fi
chown root:root /usr/local/sbin/*;
chmod 544 /usr/local/sbin/*;
-cp -vv ~/immudex/tools/misc/motd.conf /etc/motd.conf;
+mkdir /usr/share/doc/immudex-motd;
+cp -vv ~/immudex/tools/misc/motd.conf /usr/share/doc/immudex-motd/motd.conf;
cp -vv ~/immudex/tools/misc/immudex-hostname.service /etc/systemd/system;
systemctl enable immudex-hostname.service;
cat >> /etc/bash.bashrc << EOL
if [ ! -f /tmp/.motd ]; then
-/usr/local/bin/immudex-motd2
+/usr/local/bin/immudex-motd
touch /tmp/.motd;
fi
EOL