Update 2025-04-12_10:08:15

This commit is contained in:
oib
2025-04-12 10:08:15 +02:00
parent a041565203
commit 675adbcecc

29
pull_gitea_push.sh Executable file
View File

@ -0,0 +1,29 @@
#!/bin/zsh
# Script Version: 01
# Description: Pulls the latest gitea_push.sh from Gitea into ~/scripts and makes it executable
# Set variables
# ========
GITEA_RAW_URL="https://gitea.bubuit.net/oib/at2-scripts/raw/branch/main/gitea_push.sh"
LOCAL_DIR="$HOME/scripts"
LOCAL_PATH="$LOCAL_DIR/gitea_push.sh"
# Ensure scripts directory exists
# ========
if [ ! -d "$LOCAL_DIR" ]; then
echo "[INFO] Creating directory $LOCAL_DIR"
mkdir -p "$LOCAL_DIR"
fi
# Main Process
# ========
echo "[INFO] Downloading gitea_push.sh from Gitea"
curl -L "$GITEA_RAW_URL" -o "$LOCAL_PATH"
if [ $? -eq 0 ]; then
chmod +x "$LOCAL_PATH"
echo "[INFO] gitea_push.sh downloaded and made executable at $LOCAL_PATH"
else
echo "[ERROR] Failed to download gitea_push.sh"
fi