Skip to content

Commit 365485f

Browse files
committed
Ensure working directory is created before downloading service file
1 parent 972868c commit 365485f

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

install.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,11 @@ sudo mv "$TMP_BIN" "$INSTALL_DIR/$SERVICE_NAME"
5353
sudo chmod +x "$INSTALL_DIR/$SERVICE_NAME"
5454

5555
# Ensure service file exists, download if missing
56+
5657
SERVICE_SRC="$WORK_DIR/sample.service"
58+
if [ ! -d "$WORK_DIR" ]; then
59+
mkdir -p "$WORK_DIR"
60+
fi
5761
if [ ! -f "$SERVICE_SRC" ]; then
5862
echo "sample.service not found locally. Downloading from GitHub..."
5963
RAW_URL="https://raw.githubusercontent.com/${REPO}/${TAG}/sample.service"

0 commit comments

Comments
 (0)