Make www fixes for selfupdate.

pull/257/head
Christopher Young 2016-02-15 13:09:40 -05:00
rodzic c2623d7f44
commit db727ba378
3 zmienionych plików z 21 dodań i 5 usunięć

Wyświetl plik

@ -20,12 +20,21 @@ cp libdump978.so work/bin/
cp linux-mpu9150/libimu.so work/bin/
cp init.d-stratux work/bin/
cp dump1090/dump1090 work/bin/
cp -r web work/bin/
#TODO: librtlsdr.
cd work/
cat ../selfupdate/update_header.sh >update.sh
echo "stratuxVersion=${stratuxVersion}" >>update.sh
echo "stratuxBuild=${stratuxBuild}" >>update.sh
find bin/ -type d | sed -e 's/^bin\///' | grep -v '^$' | while read dn; do
echo "mkdir -p $dn" >>update.sh
done
find bin/ -type f | while read fn; do
echo -n "packaging $fn... "
UPFN=`echo $fn | cut -d/ -f2`
UPFN=`echo $fn | sed -e 's/^bin\///'`
echo "cat >${UPFN}.b64 <<__EOF__" >>update.sh
gzip -c $fn | base64 >>update.sh
echo "__EOF__" >>update.sh
@ -37,7 +46,7 @@ cat ../selfupdate/update_footer.sh >>update.sh
chmod +x update.sh
OUTF="update-${stratuxVersion}.sh"
OUTF="update-${stratuxVersion}-${stratuxBuild:0:10}.sh"
mv update.sh $OUTF

Wyświetl plik

@ -1,12 +1,15 @@
cp -f gen_gdl90 /usr/bin/gen_gdl90
cp -f libdump978.so /usr/lib/libdump978.so
cp -f linux-mpu9150/libimu.so /usr/lib/libimu.so
cp -f libimu.so /usr/lib/libimu.so
#Startup script.
# Startup script.
cp -f init.d-stratux /etc/init.d/stratux
chmod 755 /etc/init.d/stratux
ln -s /etc/init.d/stratux /etc/rc2.d/S01stratux
ln -s /etc/init.d/stratux /etc/rc6.d/K01stratux
cp -f dump1090 /usr/bin/
# Web files install.
cd web/ && make stratuxBuild=${stratuxBuild}

Wyświetl plik

@ -1,3 +1,7 @@
ifeq ($(statuxBuild),)
stratuxBuild=`git log -n 1 --pretty=%H`
endif
all:
mkdir -p /var/www
mkdir -p /var/www/css
@ -30,4 +34,4 @@ all:
cp index.html /var/www
cp stratux.appcache /var/www
# Mark the manifest with the git hash.
echo "# Stratux build: " `git log -n 1 --pretty=%H` >>/var/www/stratux.appcache
echo "# Stratux build: " ${stratuxBuild} >>/var/www/stratux.appcache