fixed a lot of stuff
This commit is contained in:
+5
-2
@@ -3,12 +3,15 @@ function pack
|
||||
echo "Usage: pack <archive-name> <file-or-dir> [more files...]"
|
||||
return 1
|
||||
end
|
||||
if not command -q tar
|
||||
echo "pack: 'tar' is not installed. Install it via your package manager."
|
||||
return 1
|
||||
end
|
||||
|
||||
set archive $argv[1]
|
||||
set targets $argv[2..-1]
|
||||
|
||||
# Ensure .tar.xz extension
|
||||
if not string match -r '\.tar\.xz$' -- $archive
|
||||
if not string match -q '*.tar.xz' -- $archive
|
||||
set archive "$archive.tar.xz"
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user