Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
executable file 36 lines (31 sloc) 764 Bytes
#!/bin/bash
# Symlink this to a location in your $path
# e.g. ln -s `pwd`/rsdns /usr/local/bin/rsdns
FILELOCATION=$0
while readlink "$FILELOCATION" > /dev/null
do
FILELOCATION=$(readlink "$FILELOCATION")
done
LOCATION=$(dirname "$FILELOCATION")
COMMAND=$1
if [ "$COMMAND" ]
then
shift
$LOCATION/rsdns-$COMMAND.sh $@
else
printf "\n"
printf "Use the -h switch for details on how to use each sub command \n"
printf "e.g. rsdns a -h \n"
printf "\n"
printf "Available commands: \n"
printf "\n"
cd $LOCATION
(
for COMMAND in $(ls rsdns-*.sh | sed "s/rsdns-\(.*\)\.sh/ \1/")
do
echo -n " $COMMAND | "
./rsdns-$COMMAND.sh -w
done
) | column -t -s '|'
printf "\n"
fi
Something went wrong with that request. Please try again.