compress
This commit is contained in:
parent
f79bd3b787
commit
11aaaa5c9a
1 changed files with 25 additions and 0 deletions
25
compress.sh
Executable file
25
compress.sh
Executable file
|
@ -0,0 +1,25 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
archiv=$2
|
||||
|
||||
if [ "make" == "$1" ]; then
|
||||
while (( "$(expr $# - 2)" ))
|
||||
do
|
||||
|
||||
dateien="$3 ${dateien}"
|
||||
|
||||
shift
|
||||
|
||||
done
|
||||
|
||||
tar -cf ${archiv}.tar ${dateien}
|
||||
pixz ${archiv}.tar ${archiv}.tar.pxz
|
||||
elif [ "restore" == "$1" ]; then
|
||||
pixz -d ${archiv} ${archiv/.pxz*}
|
||||
|
||||
tar -xf ${archiv/.pxz*}
|
||||
else
|
||||
echo "./compress.sh make/restore input/output"
|
||||
fi
|
Loading…
Reference in a new issue