Skip to content
Snippets Groups Projects
Commit 6318981a authored by Erick Hitter's avatar Erick Hitter
Browse files

Cleanup

parent cdb11e0b
Branches
Tags
No related merge requests found
...@@ -11,4 +11,4 @@ echo 1 >number ...@@ -11,4 +11,4 @@ echo 1 >number
tar -M -F './tar-multi-volume-script x file' -xf file.tar 2>&- tar -M -F './tar-multi-volume-script x file' -xf file.tar 2>&-
# remove a spurious file # remove a spurious file
rm file.tar rm file.tar
\ No newline at end of file
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
echo 1 >number echo 1 >number
# multi-volume archive creation # 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 # execute the "change-volume" script a last time
./tar-multi-volume-script c file ./tar-multi-volume-script c file
\ No newline at end of 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" ...@@ -5,10 +5,9 @@ mode="$1"
prefix="$2" prefix="$2"
n=$(<number) n=$(<number)
case $mode in case $mode in
c) mv "$prefix.tar" "$prefix-$n.tar" ;; c) mv "$prefix.tar" "$prefix-$n.tar" ;;
x) cp "$prefix-$n.tar" "$prefix.tar" ;; x) cp "$prefix-$n.tar" "$prefix.tar" ;;
esac esac
echo $((n+1)) >number echo $((n+1)) >number
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment