Replace realpath by readlink #21

This commit is contained in:
Antonin Décimo
2015-07-09 11:45:03 +02:00
parent 661f041216
commit ae3b742c45

View File

@@ -224,8 +224,8 @@ read_options () {
-i|--${pre}icon ) -i|--${pre}icon )
ICON="$2" ICON="$2"
if [[ -d $ICON ]]; then if [[ -d $ICON ]]; then
local icon="$(realpath "$ICON")" local icon="$(readlink -m "$ICON")"
local wd="$(realpath "$PWD")" local wd="$(readlink -m "$PWD")"
EXCLUDE+=( "${icon//$wd\/}/*" ) EXCLUDE+=( "${icon//$wd\/}/*" )
elif [[ -f $ICON ]]; then elif [[ -f $ICON ]]; then
EXCLUDE+=( "$ICON" ) EXCLUDE+=( "$ICON" )
@@ -342,8 +342,8 @@ create_love_file () {
if [[ -d $file ]]; then file="$file/*"; fi if [[ -d $file ]]; then file="$file/*"; fi
dotfiles+=( "$file" ) dotfiles+=( "$file" )
done done
local release_dir="$(realpath "$RELEASE_DIR")" local release_dir="$(readlink -m "$RELEASE_DIR")"
local wd="$(realpath "$PWD")" local wd="$(readlink -m "$PWD")"
zip -FS -$1 -r "$RELEASE_DIR/$LOVE_FILE" \ zip -FS -$1 -r "$RELEASE_DIR/$LOVE_FILE" \
-x "$0" "${release_dir//$wd\/}/*" "${dotfiles[@]}" "${EXCLUDE[@]}" @ \ -x "$0" "${release_dir//$wd\/}/*" "${dotfiles[@]}" "${EXCLUDE[@]}" @ \
"${FILES[@]}" "${FILES[@]}"