From 056f0087e7ee5e427a6becbe0f5821d5d5fe901c Mon Sep 17 00:00:00 2001 From: David Tomaschik Date: Wed, 18 Nov 2015 00:23:21 -0800 Subject: [PATCH] Add Pentester Framework. --- install.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index ce37d39..917a20b 100755 --- a/install.sh +++ b/install.sh @@ -66,8 +66,12 @@ function install_git { } function add_bin_symlink { - local LINKNAME=${2:-`basename $1`} - ln -s ${1} ${HOME}/bin/${LINKNAME} + local LINKNAME=${HOME}/bin/${2:-`basename $1`} + if [[ -e ${LINKNAME} && ! -h ${LINKNAME} ]] ; then + echo "Refusing to overwrite ${LINKNAME}" >&2 + return 1 + fi + ln -sf ${1} ${LINKNAME} } function postinstall {