Clarify comments in pot scripts.

pull/222/head
erinhmclark 2025-03-19 11:33:35 +00:00
rodzic 675de50ee7
commit 93921e71d4
2 zmienionych plików z 7 dodań i 16 usunięć

Wyświetl plik

@ -1,5 +1,5 @@
#!/bin/bash
set -e # Exit on error
set -e
SCRIPTS_DIR="scripts/potoken_provider"
TARGET_DIR="$SCRIPTS_DIR/bgutil-provider"
@ -11,7 +11,6 @@ if [ ! -d "$TARGET_DIR" ]; then
exit 1
fi
# Move into the server directory
cd "$TARGET_DIR" || exit 1
# Check if dependencies need installation
@ -31,12 +30,4 @@ else
fi
## Ensure the script exists after transpilation
#if [ ! -f "$GEN_SCRIPT" ]; then
# echo "Error: PO Token script not found after attempting transpilation."
# exit 1
#fi
# Confirm success
echo "PO Token provider script is ready for use."

Wyświetl plik

@ -1,26 +1,26 @@
#!/bin/bash
set -e # Exit on error
set -e
SCRIPTS_DIR="scripts/potoken_provider"
TARGET_DIR="$SCRIPTS_DIR/bgutil-provider"
BGUTIL_REPO="https://github.com/Brainicism/bgutil-ytdlp-pot-provider.git"
BGUTIL_TEMP_DIR="$SCRIPTS_DIR/bgutil-temp"
# Clone fresh copy into temporary directory
# Clone fresh copy of the POT generation script repo into temporary directory
git clone --depth 1 "$BGUTIL_REPO" "$BGUTIL_TEMP_DIR"
# Ensure the target directory exists
# Ensure the target directory exists, clear for a fresh install
rm -rf "$TARGET_DIR"
mkdir -p "$TARGET_DIR"
# Copy only the contents inside /server/ into bgutil-provider
# Copy only the contents inside /server/ into bgutil-provider,
# as this is the part containing the PO Token generation script
echo "Copy /server/ contents into $TARGET_DIR..."
cp -r "$BGUTIL_TEMP_DIR/server/"* "$TARGET_DIR/"
# Clean up: remove the cloned repository
# Clean up: remove the cloned repository as we only needed the /server/ contents
echo "Cleaning up temporary files..."
rm -rf "$BGUTIL_TEMP_DIR"
# Confirm success
echo "PO Token provider script is ready in: $TARGET_DIR/build"
echo "Commit and push changes to include it in version control."