Commit 6318981a authored by Erick Hitter's avatar Erick Hitter

Cleanup

parent cdb11e0b
......@@ -11,4 +11,4 @@ echo 1 >number
tar -M -F './tar-multi-volume-script x file' -xf file.tar 2>&-
# remove a spurious file
rm file.tar
\ No newline at end of file
rm file.tar
......@@ -5,7 +5,7 @@
echo 1 >number
# multi-volume archive creation
tar -ML 200000 -F './tar-multi-volume-script c file' -cf file.tar ~/broadway/www/digiday/wp-content/uploads/ 2>&-
tar -ML 20000 -F './tar-multi-volume-script c file' -cf file.tar "$1" 2>&-
# execute the "change-volume" script a last time
./tar-multi-volume-script c file
\ No newline at end of file
./tar-multi-volume-script c file
#!/bin/bash
prefix="$1"
n=1
while [[ -e "$prefix-$n.tar" ]]; do
((n++))
done
mv "$prefix.tar" "$prefix-$n.tar"
echo "$prefix-$n.tar"
\ No newline at end of file
......@@ -5,10 +5,9 @@ mode="$1"
prefix="$2"
n=$(<number)
case $mode in
c) mv "$prefix.tar" "$prefix-$n.tar" ;;
x) cp "$prefix-$n.tar" "$prefix.tar" ;;
esac
echo $((n+1)) >number
\ No newline at end of file
echo $((n+1)) >number
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment