Skip to content

Commit

Permalink
introduce 'scripts' folder
Browse files Browse the repository at this point in the history
this scripts folder contains/should contain usefull scripts around the dxlAPRS
toolchain.

With this commit we provide two scripts for:
* updating whole toolchain from an www-server for ARMv6 and ARMv7
  out of the box it is usable on our raspberry pi tinycore image and
  am335x hamlinux linux
  the scripts fetches the most current build from
  http://web.oe5xbl.ampr.at/~aprsbuild (HAMNET)

Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at>
  • Loading branch information
Hannes Schmelzer committed Feb 24, 2016
1 parent 0aa76b8 commit ae8d2cc
Show file tree
Hide file tree
Showing 3 changed files with 104 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packCurrent.sh
Expand Up @@ -18,7 +18,7 @@ for i in $FLIST; do
fi
done

PACKLIST=`echo $PACKLIST ../aprsmap_common/* ../dxlAPRS_common/*`
PACKLIST=`echo $PACKLIST ../aprsmap_common/* ../dxlAPRS_common/* ../scripts/*`

echo $PACKLIST

Expand Down
57 changes: 57 additions & 0 deletions scripts/updateDXLaprs_armv6
@@ -0,0 +1,57 @@
#!/bin/sh
USER=`whoami`
if [ "$USER" != "root" ]; then
echo "you must do this as root!"
exit 1
fi

DSTMAP=/mnt/mmcblk0p2/dxlAPRS/aprsmap
DSTAPRS=/mnt/mmcblk0p2/dxlAPRS/aprs
SOURCE=http://web.oe5xbl.ampr.at/~aprsbuild
FILE=dxlAPRS_armv6-current


[ -d $DSTMAP ] || mkdir -p $DSTMAP
[ -d $DSTMAP/osm ] || mkdir -p $DSTMAP/osm
[ -d $DSTAPRS ] || mkdir -p $DSTAPRS

cd /tmp
[ -d dxlAPRS-update ] || mkdir dxlAPRS-update
cd dxlAPRS-update
[ -r $FILE.tgz ] && rm $FILE.tgz
wget $SOURCE/$FILE.tgz

if [ $? -eq 0 ] && [ -r $FILE.tgz ]; then
gunzip $FILE.tgz
tar -xf $FILE.tar
rm $FILE.tar
echo "stopping all aprs-executeables ..."
killall afskmodem 2>/dev/null
killall gps2aprs 2>/dev/null
killall gps2digipos 2>/dev/null
killall sondemod 2>/dev/null
killall sondeudp 2>/dev/null
killall udpflex 2>/dev/null
killall udphub 2>/dev/null
killall udprfnet 2>/dev/null
killall udpgate4 2>/dev/null
killall udpbox 2>/dev/null
echo "installing aprsmap-components ..."
mv -f aprsmap_common/* $DSTMAP/
mv -f aprsmap $DSTMAP/
rm -r aprsmap_common
echo "installing aprs-components ..."
cp -f -r dxlAPRS_common/* $DSTAPRS/
rm -r dxlAPRS_common
mv -f * $DSTAPRS/
chown -R tc:staff $DSTAPRS

chown root:staff $DSTAPRS/afskmodem
olddir=`pwd`
cd $DSTAPRS
for f in $(\ls); do
test -x $f && chmod 0755 $f
done
chmod +s afskmodem
cd $olddir
fi
46 changes: 46 additions & 0 deletions scripts/updateDXLaprs_armv7hf
@@ -0,0 +1,46 @@
#!/bin/sh
USER=`whoami`
if [ "$USER" != "root" ]; then
echo "you must do this as root!"
exit 1
fi

DSTMAP=/home/dxlAPRS/aprsmap
DSTAPRS=/home/dxlAPRS/aprs
SOURCE=http://web.oe5xbl.ampr.at/~aprsbuild
FILE=dxlAPRS_armv7hf-current


[ -d $DSTMAP ] || mkdir -p $DSTMAP
[ -d $DSTMAP/osm ] || mkdir -p $DSTMAP/osm
[ -d $DSTAPRS ] || mkdir -p $DSTAPRS

cd /tmp
[ -d dxlAPRS-update ] || mkdir dxlAPRS-update
cd dxlAPRS-update
[ -r $FILE.tgz ] && rm $FILE.tgz
wget $SOURCE/$FILE.tgz

if [ $? -eq 0 ] && [ -r $FILE.tgz ]; then
gunzip $FILE.tgz
tar -xf $FILE.tar
rm $FILE.tar
echo "installing aprsmap-components ..."
mv -f aprsmap_common/* $DSTMAP/
mv -f aprsmap $DSTMAP/
rm -r aprsmap_common
echo "installing aprs-components ..."
cp -r dxlAPRS_common/* $DSTAPRS/
rm -r dxlAPRS_common
mv -f * $DSTAPRS/
chown -R aprs:staff $DSTAPRS

chown root:staff $DSTAPRS/afskmodem
olddir=`pwd`
cd $DSTAPRS
for f in $(\ls); do
test -x $f && chmod 0755 $f
done
chmod +s afskmodem
cd $olddir
fi

0 comments on commit ae8d2cc

Please sign in to comment.