Blame once/install.sh

4721ce
#!/bin/sh
4721ce
cd2b89
set -eu
cd2b89
76d736
if [ $# = 1 ]; then
76d736
	case "$1" in
76d736
		--output=*)
76d736
			exec 1>${1#*=}
76d736
			exec 2>&1
76d736
			;;
76d736
	esac
76d736
fi
76d736
4721ce
export PS1='\[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\e[33m\]\w\[\e[0m\]\n\$ '
4721ce
export HOME=/home/midipix
4721ce
4721ce
if [ -z "$SYSROOT" ]; then
4721ce
	echo '$SYSROOT is not set!'
4721ce
	exit 2
4721ce
else
cd2b89
	mkdir -p "$SYSROOT"
4721ce
fi
4721ce
cf9939
rm -f /etc/tarballs.sha256.tmp
cf9939
4721ce
for tarball in /tarballs/*.tar.gz; do
4721ce
	echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
4721ce
	echo extracting files from $tarball
4721ce
	echo ..................................................
cd2b89
	tar -xpvf $tarball -C "$SYSROOT"
cf9939
	sha256sum $tarball >> /etc/tarballs.sha256.tmp
4721ce
	echo ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4721ce
	echo
4721ce
done
4721ce
cf9939
rm -f /etc/tarballs.sha256
cf9939
sed 's@/tarballs/@@g' /etc/tarballs.sha256.tmp > /etc/tarballs.sha256
cf9939
cd2b89
/custom.sh
4721ce
4721ce
echo
4721ce
echo
4721ce
echo !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
4721ce
echo Congrats! All tarballs were successfully extracted.
4721ce
echo !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!