2011-07-07 07:02:50 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
fw=$1
|
|
|
|
if test ! -f ../../$fw.tar.gz; then
|
2011-07-30 13:22:25 +00:00
|
|
|
echo "usage: makeimage <fhem-VERSION>"
|
2011-07-08 08:32:54 +00:00
|
|
|
echo "../../<fhem-VERSION>.tar.gz must exist"
|
2011-07-07 07:02:50 +00:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
rm -rf var
|
2012-10-27 16:23:09 +00:00
|
|
|
echo Extracting the fritzbox template
|
2011-07-07 07:02:50 +00:00
|
|
|
tar xf ../../priv/fritzbox7390_template.tar
|
|
|
|
cd var
|
|
|
|
tar zxf fhem.tar.gz
|
2012-10-27 16:23:09 +00:00
|
|
|
rm -rf fhem/FHEM www docs
|
|
|
|
mkdir fhem/FHEM fhem/docs
|
2011-07-07 07:02:50 +00:00
|
|
|
cd ..
|
|
|
|
|
2012-10-27 16:23:09 +00:00
|
|
|
cp install var
|
2013-02-10 18:15:46 +00:00
|
|
|
cp startfhem startfhemAsRoot var/fhem
|
2012-10-27 16:23:09 +00:00
|
|
|
cp fhemcmd.sh var/fhem/FHEM
|
|
|
|
|
|
|
|
|
|
|
|
echo Extracting $fw
|
2011-07-07 07:02:50 +00:00
|
|
|
rm -rf $fw
|
|
|
|
tar zxf ../../$fw.tar.gz
|
2012-09-18 14:11:49 +00:00
|
|
|
cd $fw
|
2012-10-27 16:23:09 +00:00
|
|
|
cp fhem.cfg fhem.pl ../var/fhem
|
|
|
|
cp -rp FHEM/* ../var/fhem/FHEM
|
2012-10-28 18:03:05 +00:00
|
|
|
cp docs/*.html docs/*.jpg ../var/fhem/docs
|
2012-10-27 16:23:09 +00:00
|
|
|
cp -rp www ../var/fhem
|
2011-07-07 07:02:50 +00:00
|
|
|
|
2012-10-27 16:23:09 +00:00
|
|
|
cd ..
|
2012-09-18 14:11:49 +00:00
|
|
|
rm -rf $fw
|
2011-07-07 07:02:50 +00:00
|
|
|
|
2012-10-27 16:23:09 +00:00
|
|
|
|
|
|
|
echo Packing again
|
|
|
|
cd var/fhem
|
|
|
|
cat >> fhem.cfg << 'EOF'
|
2012-12-29 17:21:04 +00:00
|
|
|
#FB_checkPw does not for FB-OS > 5.22
|
|
|
|
#attr WEB basicAuth {use FritzBoxUtils;;FB_checkPw("localhost","$password") }
|
|
|
|
#attr WEBphone basicAuth {use FritzBoxUtils;;FB_checkPw("localhost","$password") }
|
|
|
|
#attr WEBtablet basicAuth {use FritzBoxUtils;;FB_checkPw("localhost","$password") }
|
|
|
|
#attr telnetPort globalpassword {use FritzBoxUtils;;FB_checkPw("localhost","$password") }
|
2012-10-27 16:23:09 +00:00
|
|
|
EOF
|
|
|
|
|
|
|
|
cd ..
|
2011-07-07 07:02:50 +00:00
|
|
|
tar zcf fhem.tar.gz fhem
|
|
|
|
rm -rf fhem
|
2012-09-18 14:11:49 +00:00
|
|
|
|
2012-10-27 16:23:09 +00:00
|
|
|
cd ..
|
2011-07-07 07:02:50 +00:00
|
|
|
tar cf $fw-fb7390.image var
|
|
|
|
rm -rf var
|