12 lines
287 B
Bash
Executable File
12 lines
287 B
Bash
Executable File
#!/bin/bash
|
|
|
|
DIR=$1
|
|
|
|
[ $# -lt 1 ] && echo "Directory argument is missing" && exit
|
|
[ $# -gt 1 ] && echo "Too many arguments" && exit
|
|
[ ! -d $DIR ] && echo "Directory ${DIR} does not exist" && exit
|
|
|
|
./db -e ${DIR}
|
|
tar -cjpf ${DIR}.tar.bz2 ${DIR} ${DIR}.*
|
|
ls -l ${DIR}.tar.bz2 --color=auto
|