From: Chris Koeritz Date: Sun, 30 Sep 2012 23:07:40 +0000 (-0400) Subject: better naming. X-Git-Tag: 2.140.90~1210 X-Git-Url: https://feistymeow.org/gitweb/?a=commitdiff_plain;h=61bc9542d96e1603b8dfbe1e5e8a156f2c9eb936;p=feisty_meow.git better naming. --- diff --git a/scripts/archival/unpack.sh b/scripts/archival/unpack.sh index 744d3548..965928c7 100644 --- a/scripts/archival/unpack.sh +++ b/scripts/archival/unpack.sh @@ -25,7 +25,8 @@ if [ ! -f "$archive_file" ]; then fi unpack_dir="$1"; shift if [ -z "$unpack_dir" ]; then - unpack_dir=$(echo arch_$(basename $archive_file) | sed -e 's/^\([^\.]*\)\..*/\1/') + all_but_last="$(echo "$(basename $archive_file)" | sed -e 's/\([\^.]*\)\.[^\.]*$/\1/')" + unpack_dir="arch_${all_but_last}" fi if [ ! -d "$unpack_dir" ]; then