Skip to content
Snippets Groups Projects
get-packages.sh 453 B
Newer Older
Anh Nguyen-Tuong's avatar
Anh Nguyen-Tuong committed
#!/bin/bash
Anh Nguyen-Tuong's avatar
Anh Nguyen-Tuong committed

args="$@"
Anh Nguyen-Tuong's avatar
Anh Nguyen-Tuong committed
if [[ "$args" == "" ]]; then
        args="all"
fi

for arg in $args; do
	case $arg in
Anh Nguyen-Tuong's avatar
Anh Nguyen-Tuong committed
		build)
			# do nothing
		;;

		all | deploy | test)
		        which apt-get 1> /dev/null 2> /dev/null
			if [ $? -eq 0 ]; then
				sudo apt-get install -y --ignore-missing afl
			else
				sudo yum install -y --skip-broken afl
			fi
		;;

Anh Nguyen-Tuong's avatar
Anh Nguyen-Tuong committed
			echo "arg not recognized. Recognized args: all, build, test, deploy"
			exit 1
		;;
	esac
done