Skip to content

Commit

Permalink
Exclude dev and run from clear early flag
Browse files Browse the repository at this point in the history
  • Loading branch information
hung3a8 committed Jan 18, 2024
1 parent 89d15f3 commit de7c73f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ jobs:
with:
host: ${{ secrets.SCP_HOST }}
username: ${{ secrets.SCP_USERNAME }}
password: ${{ secrets.SCP_PASSWORD }}
key: ${{ secrets.SCP_KEY }}
port: 22
source: live-build/contestant.iso
target: /home/${{ secrets.SERVER_USERNAME }}/contestant.iso
10 changes: 7 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@ icpc_build() {
log "Done"

log "Unmounting /dev and /run from chroot"
umount -f $CHROOT/dev
umount -f $CHROOT/run
umount $CHROOT/dev
umount $CHROOT/run
log "Done"

rm -rf $ICPC_ISO_FILENAME
Expand Down Expand Up @@ -199,7 +199,11 @@ icpc_image_build() {

if [ $CLEAR_EARLY = true ]; then
log "Clearing early to free up space"
rm -rf $CHROOT
for i in $(ls $CHROOT); do
if [ ! $i = "dev" ] && [ ! $i = "run" ]; then
rm -rf $CHROOT/$i
fi
done
log "Done"
fi

Expand Down

0 comments on commit de7c73f

Please sign in to comment.