2019-04-27 22:09:36 +00:00
|
|
|
#! env zsh
|
2019-12-11 05:52:23 +00:00
|
|
|
# -*- sh -*-
|
2019-04-27 22:09:36 +00:00
|
|
|
REPORT=`dirname $0`/report
|
|
|
|
|
|
|
|
if [[ -z $1 ]] ; then
|
|
|
|
$REPORT error "ERROR: Symlink to delete does not exist.\n symlink: $1"
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
|
|
|
if ! ( [[ -e $1 ]] || [[ -L $1 ]] ) ; then
|
|
|
|
$REPORT warn "$1 does not exist."
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [[ ! -L $1 ]] ; then
|
|
|
|
$REPORT warn "$1 is not a symbolic link. Skipping."
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
|
|
|
$REPORT info "Deleting $1"
|
|
|
|
rm $1
|
2019-12-11 05:52:23 +00:00
|
|
|
|