use zip instead of tar.gz, also print the location of the archive

This commit is contained in:
Mylloon 2023-10-08 19:56:59 +02:00
parent d50da86a43
commit 1f7ccd5176
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -3,9 +3,12 @@ function ssh-export
set entry_directory "$PWD" set entry_directory "$PWD"
# Create the archive # Create the archive
set output_file "$HOME/ssh_keys.zip"
cd "$HOME/.ssh" cd "$HOME/.ssh"
tar cz --exclude='known_hosts*' -X environment -f "$HOME/SSH.tar.gz" * zip "$output_file" * -x 'known_hosts*' -x environment
# Returns to the entry directory # Returns to the entry directory
cd "$entry_directory" cd "$entry_directory"
echo "Exported at $output_file."
end end