Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 58 lines (46 sloc) 1.132 kb
#!/usr/bin/env bash
usage()
{
printf "
Usage:
$0 [--help] extension_name
where extension_name is one of:
$(find * -type d -maxdepth 0)"
}
[[ -s /etc/bdsmrc ]] && source /etc/bdsmrc
[[ -s "$HOME/.bdsmrc" ]] && source "${HOME}/.bdsmrc"
if [[ $UID -eq 0 ]] ; then
true ${bdsm_path:="/usr/local/bdsm"}
else
true ${bdsm_path:="$HOME/.bdsm"}
fi
if [[ -z "$*" ]]; then
printf "\n\n"
fi
while [[ $# -gt 0 ]] ; do
token="$1" ; shift
case "$1" in
--trace)
;;
--help|help)
usage
;;
*)
if [[ -d $token ]] ; then
if [[ ! -d "$bdsm_path/extensions" ]]; then
printf "It appears that BDSM has not been installed to $bdsm_path\n"
if [[ $(id -u) -ne 0 && -d "/usr/local/bdsm" ]]; then
printf "It also appears that you installed BDSM as root, "
printf "please run this script as root in order to install extensions.\n"
fi
exit 1
fi
cp -Rf $token "$bdsm_path/extensions/"
else
printf "$token is an unknown command / extension.\n"
usage
exit 1
fi
esac
done
exit 0
Jump to Line
Something went wrong with that request. Please try again.