~mil/sxmo-build

205ba44ec2e56758df1aa19a306a33d2d32a5e67 — Peter John Hartman a month ago 73c5c4d
interactive mode

Signed-off-by: Stacy Harper <contact@stacyharper.net>
1 files changed, 30 insertions(+), 9 deletions(-)

M sxmo_build_all.sh
M sxmo_build_all.sh => sxmo_build_all.sh +30 -9
@@ 6,15 6,25 @@ cd build-sxmo-dev

set -e

if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
	echo "Usage: sxmo_build_all [options]">&2
	echo "Options: --force    Overwrite existing config.h">&2
	exit 0
elif [ "$1" = "-f" ] || [ "$1" = "--force" ]; then
	FORCE=1
else
	FORCE=0
fi
FORCE=0
INTERACTIVE=0
while [ $# -gt 0 ] ; do
	case $1 in
		-h | --help)
			echo "Usage: sxmo_build_all [options]">&2
			echo "Options: --force    Overwrite existing config.h">&2
			echo "--interactive   Prompt">&2
			exit 0 
			;;
		-f | --force) 
			FORCE=1 
			;;
		-i | --interactive) 
			INTERACTIVE=1 
			;;
	esac
	shift
done

echo "Installing build dependencies (permanently, this may prompt for your sudo password)">&2
if [ -f /etc/os-release ]; then


@@ 25,6 35,10 @@ else
	OS="Unknown"
fi

if [ $INTERACTIVE -eq 1 ]; then
	read -p "Any key to continue..."
fi

case $OS in
	"Arch Linux ARM")
		sudo pacman -Syu --needed libxft libx11 libxinerama webkit2gtk \


@@ 60,6 74,9 @@ repos="~mil/sxmo-utils ~mil/sxmo-dwm ~mil/sxmo-dmenu ~mil/lisgd ~mil/sxmo-surf ~

for repo in $repos; do
	echo "Obtaining $repo...">&2
	if [ $INTERACTIVE -eq 1 ]; then
		read -p "Any key to continue..."
	fi
	repodir="$(basename "$repo")"
	if [ -d "$repodir" ]; then
		cd "$repodir"


@@ 88,6 105,10 @@ done

cd ..

if [ $INTERACTIVE -eq 1 ]; then
	read -p "Any key to continue..."
fi

case $OS in
	"Arch Linux ARM")
		#TODO!