posix sh extract fix

This commit is contained in:
Luke Smith 2019-01-08 00:27:41 -05:00
parent bae314a11e
commit a7a8f94a59
No known key found for this signature in database
GPG Key ID: 4C50B54A911F6252

View File

@ -11,7 +11,7 @@ esac done
if [ -z "$extracthere" ]; then if [ -z "$extracthere" ]; then
archive="$(readlink -f "$*")" && archive="$(readlink -f "$*")" &&
directory=${archive%.*} && directory="$(echo "$archive" | sed 's/\.[^\/.]*$//')" &&
mkdir -p "$directory" && mkdir -p "$directory" &&
cd "$directory" || exit cd "$directory" || exit
else else