add dir2sb

pull/40/head
TomasM 2017-10-07 05:14:08 -04:00
parent 4e42acd0c5
commit 1d2cccdef7
1 changed files with 19 additions and 0 deletions

19
tools/dir2sb 100755
View File

@ -0,0 +1,19 @@
#!/bin/bash
if [ "$2" = "" ]; then
echo "Usage: $0 [source directory] [target file.sb]"
exit 1
fi
if [ ! -d "$1" ]; then
echo "Not a directory: $1"
exit 2
fi
if [ -e "$2" ]; then
echo "Target exists: $2"
exit 3
fi
mksquashfs "$1" "$2" -comp xz -b 512K $3 $4 $5 $6 $7 $8 $9