Skip to content

Instantly share code, notes, and snippets.

@fthiery
Created May 13, 2022 13:49
Show Gist options
  • Save fthiery/b5133288a175f72cb4854f9d33b84d4a to your computer and use it in GitHub Desktop.
Save fthiery/b5133288a175f72cb4854f9d33b84d4a to your computer and use it in GitHub Desktop.
#!/bin/bash
if [ "$EUID" -ne 0 ]
then echo "Please run as root"
exit
fi
if [ $# -lt 1 ]; then
echo 1>&2 "$0: Need zip file argument, e.g. sudo ./arch_install.sh nudgis-obs-plugin-linux-ubuntu-20.04-64_27.2.4_1.0.0.zip"
exit 2
fi
DIR=tmp
unzip $1 -d $DIR
cd $DIR
ar -x nudgis-obs-plugin-*-Linux.deb
rm control.tar.gz debian-binary *.deb
tar -xzf data.tar.gz -C /
cd ..
rm -rf tmp
echo DONE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment