Skip to content

Commit 29182ee

Browse files
committed
refact: LXC create image
1 parent ea995e0 commit 29182ee

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

‎create-lxc-image.sh‎

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,19 @@ dockerlogin() {
3636
fi
3737
}
3838

39+
# check if jq is installed
40+
if ! command -v jq >/dev/null 2>&1; then
41+
raise "jq is required but not installed. Please install jq."
42+
fi
43+
44+
if [ "$#" -ne 1 ]; then
45+
echo "Usage: $0 <config.json>"
46+
exit 1
47+
fi
48+
3949
export CONFIG_PATH="$1"
4050
if [[ ! -f "${CONFIG_PATH}" ]]; then
41-
echo "Config file not found."
42-
exit 1
51+
raise "Config file not found."
4352
fi
4453

4554
dockerlogin

0 commit comments

Comments
 (0)