Lints the executable scripts
This commit is contained in:
@ -4,26 +4,27 @@ _kickstart_readlink() {
|
||||
(
|
||||
TARGET_FILE=$1
|
||||
|
||||
cd `dirname $TARGET_FILE`
|
||||
TARGET_FILE=`basename $TARGET_FILE`
|
||||
cd "$(dirname "$TARGET_FILE")"
|
||||
TARGET_FILE=$(basename "$TARGET_FILE")
|
||||
|
||||
while [ -L "$TARGET_FILE" ]
|
||||
do
|
||||
TARGET_FILE=`readlink $TARGET_FILE`
|
||||
cd `dirname $TARGET_FILE`
|
||||
TARGET_FILE=`basename $TARGET_FILE`
|
||||
TARGET_FILE=$(readlink "$TARGET_FILE")
|
||||
cd "$(dirname "$TARGET_FILE")"
|
||||
TARGET_FILE=$(basename "$TARGET_FILE")
|
||||
done
|
||||
|
||||
PHYS_DIR=`pwd -P`
|
||||
PHYS_DIR=$(pwd -P)
|
||||
RESULT=$PHYS_DIR/$TARGET_FILE
|
||||
echo $RESULT
|
||||
echo "$RESULT"
|
||||
)
|
||||
}
|
||||
|
||||
path_to_kickstart=`which kickstart`
|
||||
if [[ `uname` == "Darwin" ]]; then
|
||||
dirname $(dirname `_kickstart_readlink "$path_to_kickstart"`)
|
||||
path_to_kickstart=$(which kickstart)
|
||||
if [[ $(uname) == "Darwin" ]]; then
|
||||
resolved_path_to_kickstart_bin=$(_kickstart_readlink "$path_to_kickstart")
|
||||
else
|
||||
dirname $(dirname `readlink -f "$path_to_kickstart"`)
|
||||
resolved_path_to_kickstart_bin=$(readlink -f "$path_to_kickstart")
|
||||
fi
|
||||
dirname "$(dirname "$resolved_path_to_kickstart_bin")"
|
||||
|
||||
|
Reference in New Issue
Block a user