Skip to content
This repository
tree: f90dc837ec
Fetching contributors…

Cannot retrieve contributors at this time

executable file 60 lines (43 sloc) 0.66 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
source ./shell/bash-colors.sh



function package ()
{
AVAIL=(brew port aptitube apt-get)

for PKG in ${AVAIL[@]}
do
if [ `which $PKG` ]
then
grey "Executing $1 with $PKG\n";
$PKG $@;
return 0;
fi
done;

AVSTR=${AVAIL[@]}

# TODO stderr
red "No package mananger found. Supported are: $AVSTR \n";

exit 1;
}

function confirm ()
{
echo -en $1 "[y/n]: ";


read RESP;

if [ $RESP = "y" ]
then
$2;
fi;
}


function install-all()
{
for bin in $@
do
echo -n "Checking for $bin... ";

if [ `which $bin` ]
then
green "yes";
else
red "no\n";

grey "Installing $bin\n";

install_$bin
fi

echo $BIN;
done
}
Something went wrong with that request. Please try again.