2013-10-21 16:21:28 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2013-10-25 22:42:11 +00:00
|
|
|
|
|
|
|
if [ "$#" -lt 2 ]; then
|
|
|
|
echo "USAGE: $0 file commands..."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
FILE=$1
|
|
|
|
shift
|
|
|
|
NEEDED_COMMANDS=$@
|
2013-10-21 16:21:28 +00:00
|
|
|
|
|
|
|
for cmd in ${NEEDED_COMMANDS} ; do
|
2013-10-25 22:42:11 +00:00
|
|
|
echo $cmd
|
2013-10-21 16:21:28 +00:00
|
|
|
if ! command -v ${cmd} &> /dev/null ; then
|
|
|
|
echo Please install ${cmd}!
|
|
|
|
exit -1
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
2013-10-25 22:42:11 +00:00
|
|
|
touch $FILE
|