return False
if __name__ == '__main__':
- if len(sys.argv) != 2 or sys.argv[1] not in ('keep', 'delete'):
+ if len(sys.argv) != 3 or sys.argv[1] not in ('keep', 'delete'):
print("usage: %s keep $liveboot_name")
print(" will return true or false, depending if 'keep_image' is set for this image")
print("usage: %s delete $liveboot_name")
sys.exit(1)
action = sys.argv[1]
name = sys.argv[2]
- if action = "keep" and not liveboot_to_keep(name):
+ if action == "keep" and not liveboot_to_keep(name):
sys.exit(1)
- if action = "delete":
+ if action == "delete":
set_liveboot_to_delete(name)
$SCRIPTSDIR/liveboot2db.py $JOB_NAME $BUILD_NUMBER $REQUEST_ID $BUILD_START $BUILD_END "successful"
if [ "$GIT_BRANCH" = "master" ] ; then
- # FIXME: too much sudo here...
+ # FIXME: too much sudo here... when this is fixed, also remove sudo call from liveboot_garbage_collection
cd /srv/build/liveboot/builds
sudo chgrp www-data *-*
sudo chmod g+w *-*
else
echo "deleted."
$SCRIPT_PATH/cleanup_liveboot.py "delete" "$DIRECTORY"
- rm -rf "$LIVEBOOT_IMAGE_PATH/$DIRECTORY"
+ # FIXME: this sudo is kinda ugly. cause is liveboot_build.sh actually
+ sudo rm -rf "$LIVEBOOT_IMAGE_PATH/$DIRECTORY"
fi
done
echo