adjusted RaspberryMatic-2.27.8.20170501 image

This commit is contained in:
Jan Schneider 2017-05-02 22:13:59 +02:00
parent d54c801c04
commit 239d785dac
2 changed files with 12 additions and 4 deletions

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c745bb688b1e22cc8adb057983df456397371d53d14dd4f83ebf5b0e76b939fc
size 205172546
oid sha256:b97db9d972cca234cba9cf7a5cf82722071f7e6ef38f9f94613c025fda182233
size 207776838

View File

@ -11,8 +11,16 @@ if [[ $EUID -ne 0 ]]; then
exit 1
fi
image_file="$1"
new_image_file="${1/\.img/\.adjusted\.img}"
image_file="$(realpath $1)"
new_image_file="${image_file/\.img/\.adjusted\.img}"
if [[ ! $image_file =~ .*\.img ]]; then
echo "Not an image file: ${image_file}." 1>&2
exit 1
fi
echo "image: ${image_file}"
echo "adjusted image: ${new_image_file}"
echo "*** Creating new image file and partitions ***"
dd if=/dev/zero of=$new_image_file bs=1M count=$((((${BOOT_SIZE}+${ROOT_SIZE}+${USR_LOCAL_SIZE})/1024/1024)+1))