You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
919 B
Plaintext
32 lines
919 B
Plaintext
5 years ago
|
#!/bin/bash
|
||
|
|
||
|
DIRECTORY="$(dirname "$(dirname "$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )")")"
|
||
|
|
||
|
function error {
|
||
|
echo -e "\\e[91m$1\\e[39m"
|
||
|
exit 1
|
||
|
}
|
||
|
|
||
|
arch=''
|
||
|
|
||
|
while [ "$arch" != 'armhf' ] && [ "$arch" != 'arm64' ]
|
||
|
do
|
||
|
echo -n "Which version of Boxy SVG do you want? [armhf/arm64] "
|
||
|
arch=''
|
||
|
read arch
|
||
|
if [ "$arch" != 'armhf' ] && [ "$arch" != 'arm64' ];then
|
||
|
echo -e "\\e[91mDid not understand '$arch'. Try again.\\e[39m"
|
||
|
fi
|
||
|
done
|
||
|
|
||
|
git clone https://github.com/Botspot/Boxy-SVG-RPi || error 'Failed to clone repository!'
|
||
|
|
||
|
if [ "$arch" == 'armhf' ];then
|
||
|
tar -xf ~/Boxy-SVG-RPi/BoxySVG-linux-armv7l.tar.xz || error 'Failed to extract!'
|
||
|
cp ~/Boxy-SVG-RPi/boxy-svg-armv7l.desktop ~/.local/share/applications
|
||
|
elif [ "$arch" == 'arm64' ];then
|
||
|
tar -xf ~/Boxy-SVG-RPi/BoxySVG-linux-arm64.tar.xz || error 'Failed to extract!'
|
||
|
cp ~/Boxy-SVG-RPi/boxy-svg-arm64.desktop ~/.local/share/applications
|
||
|
fi
|
||
|
|