summaryrefslogtreecommitdiff
path: root/recipes-navigation/gpsd/gpsdupdater/lib
diff options
context:
space:
mode:
authorJohn Klug <john.klug@multitech.com>2016-12-20 18:13:03 -0600
committerJohn Klug <john.klug@multitech.com>2016-12-20 18:13:03 -0600
commit179371d9381f86c0d68e0c981ef3fc5dce830aaa (patch)
tree5d54534e5854eae13a8c461dd29b877980aec816 /recipes-navigation/gpsd/gpsdupdater/lib
parent0f102a28f8323576eadfc20f95050f826197f665 (diff)
parentb2440edd24018fab7cff1e75ba66f1491d7dad60 (diff)
downloadmeta-mlinux-179371d9381f86c0d68e0c981ef3fc5dce830aaa.tar.gz
meta-mlinux-179371d9381f86c0d68e0c981ef3fc5dce830aaa.tar.bz2
meta-mlinux-179371d9381f86c0d68e0c981ef3fc5dce830aaa.zip
Merge gpsd changes to mlinux gitlab master
Diffstat (limited to 'recipes-navigation/gpsd/gpsdupdater/lib')
-rwxr-xr-xrecipes-navigation/gpsd/gpsdupdater/lib/bashinstaller.sh22
-rwxr-xr-xrecipes-navigation/gpsd/gpsdupdater/lib/opkginstall.sh15
2 files changed, 37 insertions, 0 deletions
diff --git a/recipes-navigation/gpsd/gpsdupdater/lib/bashinstaller.sh b/recipes-navigation/gpsd/gpsdupdater/lib/bashinstaller.sh
new file mode 100755
index 0000000..8b04288
--- /dev/null
+++ b/recipes-navigation/gpsd/gpsdupdater/lib/bashinstaller.sh
@@ -0,0 +1,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__
diff --git a/recipes-navigation/gpsd/gpsdupdater/lib/opkginstall.sh b/recipes-navigation/gpsd/gpsdupdater/lib/opkginstall.sh
new file mode 100755
index 0000000..d1c17ba
--- /dev/null
+++ b/recipes-navigation/gpsd/gpsdupdater/lib/opkginstall.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+list=""
+for f in *.ipk ; do
+ if [[ $f =~ ^busybox ]] ; then
+ continue
+ fi
+ [[ $f =~ ([^_]*) ]] && true
+ list+="${BASH_REMATCH[1]} "
+done
+list=$(echo $list | xargs)
+echo $list
+set -x
+opkg --force-depends --force-remove --force-removal-of-dependent-packages remove $list
+opkg install *.ipk
+set +x