Skip to content

Commit

Permalink
Create imagepath if not exists
Browse files Browse the repository at this point in the history
../images is not handled by git.
Build fails on git clone if you manually do not create the dir.
  • Loading branch information
obgr committed Dec 3, 2023
1 parent 9996452 commit 4d276a9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion rebuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,9 @@ cd "$BUILD_DIR"
DOCKER_EXTRA_ARGS="--cpus=12" ./compile.sh rebuild
IMG=$(ls -1 output/images/ | grep "img.xz$")

mv "$BUILD_DIR"/output/images/"$IMG" "../images/${NAME}.img.xz"
IMGPATH="../images"
if [[ ! -e $IMGPATH ]]; then
mkdir $IMGPATH
fi
mv "$BUILD_DIR"/output/images/"$IMG" "${IMGPATH}/${NAME}.img.xz"
echo "🍰 Finished building ${NAME}"

0 comments on commit 4d276a9

Please sign in to comment.