summaryrefslogtreecommitdiff
path: root/recipes-navigation/gpsd/gpsdupdater/lib/bashinstaller.sh
blob: 8b042882b8da940dc088a41083bcec4d982c82f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash
echo ""
echo "Self Extracting Installer"
echo ""

export TMPDIR=`mktemp -d /tmp/selfextract.XXXXXX`

ARCHIVE=`awk '/^__ARCHIVE_BELOW__/ {print NR + 1; exit 0; }' $0`

tail -n+$ARCHIVE $0 | (cd $TMPDIR; pwd; ls; cpio -ivdum)

CDIR=`pwd`
cd $TMPDIR
./opkginstall.sh

cd $CDIR

#rm -rf $TMPDIR

exit 0

__ARCHIVE_BELOW__