22 lines
280 B
Bash
Executable File
22 lines
280 B
Bash
Executable File
#!/bin/bash
|
|
|
|
|
|
if [ "$#" -lt 2 ]; then
|
|
echo "USAGE: $0 file commands..."
|
|
exit 1
|
|
fi
|
|
|
|
FILE=$1
|
|
shift
|
|
NEEDED_COMMANDS=$@
|
|
|
|
for cmd in ${NEEDED_COMMANDS} ; do
|
|
echo $cmd
|
|
if ! command -v ${cmd} &> /dev/null ; then
|
|
echo Please install ${cmd}!
|
|
exit -1
|
|
fi
|
|
done
|
|
|
|
touch $FILE
|