#remove old files rm -rf ./work rm -rf ./out for f in ./versions/*; do if [ -d "$f" ]; then rm -rf ./work # clean before build rm -rf ./airootfs/root/* rm -f ./profiledef.sh # copy version files cp "$f/profiledef.sh" . cp -r "$f/airootfs"/* ./airootfs/root/ # build it mkarchiso -v -o ${PWD}/out ${PWD} fi done # clean after build rm -rf ./airootfs/root/* rm -f ./profiledef.sh