Files
neoboot/iNB.sh

67 lines
2.4 KiB
Bash
Raw Normal View History

2021-02-09 12:56:45 +02:00
#!/bin/sh
#
#skrypt instaluje neoboot-a
#
if `grep -q 'osd.language=pl_PL' </etc/enigma2/settings`; then
PL=1
fi
[ -e /tmp/neoboot.zip ] && rm -f /tmp/neoboot.zip
2021-02-09 13:05:23 +02:00
[ -e /tmp/neoboot-main ] && rm -rf /tmp/neoboot-main
2021-02-09 12:56:45 +02:00
[ $PL ] && echo "Pobieranie archiwum..." || echo "Downloading archive file..."
2021-02-12 16:22:11 +02:00
URL='https://github.com/gutosie/neoboot/archive/main.zip'
2021-02-09 12:56:45 +02:00
curl -kLs $URL -o /tmp/neoboot.zip
cd /tmp/
2021-03-06 14:58:47 +02:00
#pobieranie
2021-02-22 12:28:49 +02:00
if [ ! -e /tmp/neoboot.zip ]; then
2021-02-14 22:18:30 +02:00
wget --no-check-certificate $URL
mv -f /tmp/main.zip /tmp/neoboot.zip
fi
2021-02-22 12:28:49 +02:00
if [ ! -e /tmp/neoboot.zip ]; then
2021-02-14 22:18:30 +02:00
fullwget --no-check-certificate $URL
2021-02-09 13:07:25 +02:00
mv -f /tmp/main.zip /tmp/neoboot.zip
2021-02-09 12:56:45 +02:00
fi
unzip -qn ./neoboot.zip
rm -f /tmp/neoboot.zip
2021-02-09 13:20:54 +02:00
[ -e /tmp/main.zip ] && rm -rf /tmp/main.zip
2021-02-09 12:56:45 +02:00
#kopiowanie
Cel="/usr/lib/enigma2/python/Plugins/Extensions"
2021-03-06 14:58:47 +02:00
if [ -e $Cel/NeoBoot/.location ]; then
rm -rf $Cel/NeoBoot/.location
fi
2021-12-06 11:47:28 +02:00
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
fi
2021-03-06 14:58:47 +02:00
[ $PL ] && echo "Instalowanie..." || echo "Instaling..."
2021-02-09 12:56:45 +02:00
[ -e $Cel/NeoBoot ] && rm -rf $Cel/NeoBoot/* || mkdir -p $Cel/NeoBoot
2021-02-12 14:28:58 +02:00
mv -f /tmp/neoboot-main/NeoBoot/files/testinout /usr/lib/enigma2/python/Tools/Testinout.py
2021-02-22 10:54:05 +02:00
mkdir -p /usr/lib/periodon
2021-02-09 13:05:23 +02:00
mv -f /tmp/neoboot-main/NeoBoot/* $Cel/NeoBoot
[ -e /tmp/neoboot-main ] && rm -rf /tmp/neoboot-main
2021-02-09 12:56:45 +02:00
cd $Cel/NeoBoot
chmod 755 ./bin/*
chmod 755 ./ex_init.py
chmod 755 ./files/*.sh
2021-02-09 13:20:54 +02:00
chmod -R +x ./ubi_reader_arm/*
chmod -R +x ./ubi_reader_mips/*
2021-02-09 12:56:45 +02:00
if [ $PL ] ; then
2021-12-05 21:40:35 +02:00
chattr +i /usr/lib/enigma2/python/Plugins/Extensions/NeoBoot/plugin.py
2021-02-09 12:56:45 +02:00
echo ""
echo "#####################################################"
2021-02-12 16:22:11 +02:00
echo "# NEOBOOT ZOSTAL ZAINSTALOWANY #"
2021-02-22 12:30:22 +02:00
echo "# #"
2021-02-12 16:22:11 +02:00
echo "# ZRESTARTUJ TUNER #"
2021-02-09 12:56:45 +02:00
echo "#####################################################"
echo ""
else
echo ""
echo "#####################################################"
2021-02-12 16:22:11 +02:00
echo "# NEOBOOT INSTALLED SUCCESSFULLY #"
2021-02-22 12:30:22 +02:00
echo "# #"
2021-02-12 16:22:11 +02:00
echo "# PLEASE RESTART YOUR STB #"
2021-02-09 12:56:45 +02:00
echo "#####################################################"
echo ""
fi
2021-02-12 17:43:49 +02:00
echo " ----- Restart GUI... ----- "
2021-02-12 16:22:11 +02:00
sleep 5; killall -9 enigma2
2021-02-09 12:56:45 +02:00
exit 0