Update iNB.sh

This commit is contained in:
gutosie
2022-03-03 15:12:37 +02:00
committed by GitHub
parent f28ea7e79b
commit 7afd80c952

106
iNB.sh
View File

@@ -13,82 +13,94 @@ elif [ -f /etc/opkg/opkg.conf ] ; then
STATUS='/var/lib/opkg/status' STATUS='/var/lib/opkg/status'
OS='Opensource' OS='Opensource'
fi fi
[ -e /tmp/neoboot.zip ] && rm -f /tmp/neoboot.zip if [ ! -e /.multinfo ]; then
[ -e /tmp/neoboot-main ] && rm -rf /tmp/neoboot-main [ -e /tmp/neoboot.zip ] && rm -f /tmp/neoboot.zip
[ $PL ] && echo "Pobieranie archiwum..." || echo "Downloading archive file..." [ -e /tmp/neoboot-main ] && rm -rf /tmp/neoboot-main
URL='https://github.com/gutosie/neoboot/archive/main.zip' [ $PL ] && echo "Pobieranie archiwum..." || echo "Downloading archive file..."
curl -kLs $URL -o /tmp/neoboot.zip URL='https://github.com/gutosie/neoboot/archive/main.zip'
Cel="/usr/lib/enigma2/python/Plugins/Extensions" curl -kLs $URL -o /tmp/neoboot.zip
Cel="/usr/lib/enigma2/python/Plugins/Extensions"
if [ $BOXHOSTNAME = "dm500hd" ] || [ $BOXHOSTNAME = "dm800se" ] || [ $BOXHOSTNAME = "dm800" ] || [ $BOXHOSTNAME = "dm8000" ]; then if [ $BOXHOSTNAME = "dm500hd" ] || [ $BOXHOSTNAME = "dm800se" ] || [ $BOXHOSTNAME = "dm800" ] || [ $BOXHOSTNAME = "dm8000" ]; then
break; break;
else else
if [ -e $Cel/NeoBoot/plugin.py ]; then if [ -e $Cel/NeoBoot/plugin.py ]; then
chattr -i /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/plugin.py; chattr -i /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/plugin.pyo chattr -i /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/plugin.py; chattr -i /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/plugin.pyo
fi fi
if [ -e /usr/lib/periodon/.activatedmac ]; then if [ -e /usr/lib/periodon/.activatedmac ]; then
chattr -i /usr/lib/periodon/.activatedmac; rm -f /usr/lib/periodon/.activatedmac chattr -i /usr/lib/periodon/.activatedmac; rm -f /usr/lib/periodon/.activatedmac
fi fi
fi fi
cd /tmp/ cd /tmp/
#pobieranie #pobieranie
if [ ! -e /tmp/neoboot.zip ]; then if [ ! -e /tmp/neoboot.zip ]; then
wget --no-check-certificate $URL wget --no-check-certificate $URL
mv -f /tmp/main.zip /tmp/neoboot.zip mv -f /tmp/main.zip /tmp/neoboot.zip
fi fi
if [ ! -e /tmp/neoboot.zip ]; then if [ ! -e /tmp/neoboot.zip ]; then
fullwget --no-check-certificate $URL fullwget --no-check-certificate $URL
mv -f /tmp/main.zip /tmp/neoboot.zip mv -f /tmp/main.zip /tmp/neoboot.zip
fi fi
unzip -qn ./neoboot.zip unzip -qn ./neoboot.zip
rm -f /tmp/neoboot.zip rm -f /tmp/neoboot.zip
[ -e /tmp/main.zip ] && rm -rf /tmp/main.zip [ -e /tmp/main.zip ] && rm -rf /tmp/main.zip
if [ $BOXHOSTNAME = "dm500hd" ] || [ $BOXHOSTNAME = "dm800se" ] || [ $BOXHOSTNAME = "dm800" ] || [ $BOXHOSTNAME = "dm8000" ]; then
if [ $BOXHOSTNAME = "dm500hd" ] || [ $BOXHOSTNAME = "dm800se" ] || [ $BOXHOSTNAME = "dm800" ] || [ $BOXHOSTNAME = "dm8000" ]; then
cp -af /tmp/neoboot-main/NeoBoot/tmpfiles/runpy/mips_run.py /tmp/neoboot-main/NeoBoot/run.py; rm -r /tmp/neoboot-main/NeoBoot/ubi_reader*; rm -r /tmp/neoboot-main/NeoBoot/tmpfiles; rm -r /tmp/neoboot-main/NeoBoot/bin/neoinitar*; rm -r /tmp/neoboot-main/NeoBoot/bin/nanddump*; rm -r /tmp/neoboot-main/NeoBoot/bin/fbcle*; rm -r /tmp/neoboot-main/NeoBoot/bin/neob*; rm -r /tmp/neoboot-main/NeoBoot/bin/nandwrite; rm -r /tmp/neoboot-main/NeoBoot/bin/neoinitmips_vu cp -af /tmp/neoboot-main/NeoBoot/tmpfiles/runpy/mips_run.py /tmp/neoboot-main/NeoBoot/run.py; rm -r /tmp/neoboot-main/NeoBoot/ubi_reader*; rm -r /tmp/neoboot-main/NeoBoot/tmpfiles; rm -r /tmp/neoboot-main/NeoBoot/bin/neoinitar*; rm -r /tmp/neoboot-main/NeoBoot/bin/nanddump*; rm -r /tmp/neoboot-main/NeoBoot/bin/fbcle*; rm -r /tmp/neoboot-main/NeoBoot/bin/neob*; rm -r /tmp/neoboot-main/NeoBoot/bin/nandwrite; rm -r /tmp/neoboot-main/NeoBoot/bin/neoinitmips_vu
fi fi
#kopiowanie
#kopiowanie if [ -e $Cel/NeoBoot/.location ]; then
if [ -e $Cel/NeoBoot/.location ]; then
rm -rf $Cel/NeoBoot/.location rm -rf $Cel/NeoBoot/.location
fi fi
[ $PL ] && echo "Instalowanie..." || echo "Instaling..." [ $PL ] && echo "Instalowanie..." || echo "Instaling..."
[ -e $Cel/NeoBoot ] && rm -rf $Cel/NeoBoot/* || mkdir -p $Cel/NeoBoot [ -e $Cel/NeoBoot ] && rm -rf $Cel/NeoBoot/* || mkdir -p $Cel/NeoBoot
mv -f /tmp/neoboot-main/NeoBoot/files/testinout /usr/lib/enigma2/python/Tools/Testinout.py mv -f /tmp/neoboot-main/NeoBoot/files/testinout /usr/lib/enigma2/python/Tools/Testinout.py
mkdir -p /usr/lib/periodon mkdir -p /usr/lib/periodon
mv -f /tmp/neoboot-main/NeoBoot/* $Cel/NeoBoot mv -f /tmp/neoboot-main/NeoBoot/* $Cel/NeoBoot
[ -e /tmp/neoboot-main ] && rm -rf /tmp/neoboot-main [ -e /tmp/neoboot-main ] && rm -rf /tmp/neoboot-main
cd $Cel/NeoBoot cd $Cel/NeoBoot
chmod 755 ./bin/* chmod 755 ./bin/*
chmod 755 ./ex_init.py chmod 755 ./ex_init.py
chmod 755 ./files/*.sh chmod 755 ./files/*.sh
if [ $BOXHOSTNAME = "dm500hd" ] || [ $BOXHOSTNAME = "dm800se" ] || [ $BOXHOSTNAME = "dm800" ] || [ $BOXHOSTNAME = "dm8000" ]; then if [ $BOXHOSTNAME = "dm500hd" ] || [ $BOXHOSTNAME = "dm800se" ] || [ $BOXHOSTNAME = "dm800" ] || [ $BOXHOSTNAME = "dm8000" ]; then
break; break;
else else
chmod -R +x ./ubi_reader_arm/* chmod -R +x ./ubi_reader_arm/*
chmod -R +x ./ubi_reader_mips/* chmod -R +x ./ubi_reader_mips/*
chattr +i /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/plugin.py chattr +i /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/plugin.py
fi fi
if [ $PL ] ; then
if [ $PL ] ; then
echo "" echo ""
echo "#####################################################" echo "#####################################################"
echo "# NEOBOOT ZOSTAL ZAINSTALOWANY #" echo "# NEOBOOT ZOSTAL ZAINSTALOWANY #"
echo "#####################################################" echo "#####################################################"
echo "" echo ""
else else
echo "" echo ""
echo "#####################################################" echo "#####################################################"
echo "# >>> NEOBOOT INSTALLED SUCCESSFULLY <<< #" echo "# >>> NEOBOOT INSTALLED SUCCESSFULLY <<< #"
echo "#####################################################" echo "#####################################################"
echo "" echo ""
fi fi
echo " ----- Restart Enigma2 GUI ... ----- " echo " ----- Restart Enigma2 GUI ... ----- "
sleep 2 sleep 2
if [ $OS = 'DreamOS' ]; then if [ $OS = 'DreamOS' ]; then
systemctl restart enigma2 systemctl restart enigma2
else else
killall -9 enigma2 killall -9 enigma2
fi
else
if [ $PL ] ; then
echo ""
echo "#####################################################"
echo ">>>> Error! To nie jest image flash. <<<<"
echo "#####################################################"
echo ""
else
echo ""
echo "#####################################################"
echo ">>>> Error! Go back to image flash. <<<<#"
echo "#####################################################"
echo ""
fi
fi fi
exit 0 exit 0