16 lines
230 B
Bash
16 lines
230 B
Bash
#!/bin/bash
|
|
function file_backup {
|
|
echo 'Backup --- building tar File...'
|
|
tar -czf $2 $1 || fail "Fehler beim Archiv erstellen"
|
|
echo '+DONE'
|
|
|
|
exit 0
|
|
}
|
|
|
|
fail () {
|
|
echo "Fehler! + $1"
|
|
exit 1
|
|
}
|
|
|
|
#function call
|
|
file_backup $1 $2 |