Initial commit
This commit is contained in:
27
genimage.sh
Executable file
27
genimage.sh
Executable file
@@ -0,0 +1,27 @@
|
||||
#!/bin/sh
|
||||
# vim: set sw=4 ts=4 sts=4 et :
|
||||
|
||||
set -e
|
||||
|
||||
cleanup() {
|
||||
if [ -n "${tmproot}" ]; then
|
||||
if [ "${tmproot}" != / ]; then
|
||||
rm -rf "${tmproot}"
|
||||
fi
|
||||
unset tmproot
|
||||
fi
|
||||
}
|
||||
|
||||
. ./config
|
||||
|
||||
trap cleanup INT TERM QUIT EXIT
|
||||
tmproot=$(mktemp -d)
|
||||
tmppath=$(mktemp -d)
|
||||
|
||||
genimage \
|
||||
--rootpath "${tmproot}" \
|
||||
--tmppath "${tmppath}" \
|
||||
--inputpath images/ \
|
||||
--outputpath images/ \
|
||||
--mkdosfs mkfs.vfat \
|
||||
--config genimage.cfg
|
||||
Reference in New Issue
Block a user