mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 18:59:33 +00:00
5c226df01a
git-svn-id: https://svn.fhem.de/fhem/trunk@965 2b470e98-0d58-463d-a4d8-8e2adae1ed80
56 lines
890 B
Bash
Executable File
56 lines
890 B
Bash
Executable File
#!/bin/sh
|
|
|
|
fw=$1
|
|
if test ! -f ../../$fw.tar.gz; then
|
|
echo "usage: makeimage <fhem-VERSION>"
|
|
echo "../../<fhem-VERSION>.tar.gz must exist"
|
|
exit 1
|
|
fi
|
|
|
|
rm -rf var
|
|
echo Extracting the fritzbox template
|
|
tar xf ../../priv/fritzbox7390_template.tar
|
|
cd var
|
|
tar zxf fhem.tar.gz
|
|
rm -rf fhem/FHEM
|
|
mkdir fhem/FHEM
|
|
cd ..
|
|
|
|
cp install var
|
|
cp startfhem var/fhem
|
|
cp fhemcmd.sh var/fhem/FHEM
|
|
|
|
|
|
echo Extracting $fw
|
|
rm -rf $fw
|
|
tar zxf ../../$fw.tar.gz
|
|
cd $fw
|
|
cp fhem.pl ../var/fhem
|
|
cp FHEM/*\
|
|
webfrontend/pgm2/*\
|
|
docs/*.html\
|
|
docs/fhem.png\
|
|
docs/*.jpg\
|
|
../var/fhem/FHEM
|
|
|
|
cd examples
|
|
for i in *; do
|
|
cp -r $i ../../var/fhem/FHEM/example.$i
|
|
done
|
|
cd ../..
|
|
rm -rf $fw
|
|
|
|
|
|
echo Packing again
|
|
cd var/fhem
|
|
cp FHEM/example.sample_pgm2 fhem.cfg
|
|
perl -pi -e 's,/tmp,./log,g' fhem.cfg
|
|
|
|
cd ..
|
|
tar zcf fhem.tar.gz fhem
|
|
rm -rf fhem
|
|
|
|
cd ..
|
|
tar cf $fw-fb7390.image var
|
|
rm -rf var
|