diff --git a/scripts/potoken_provider/.gitignore b/scripts/potoken_provider/.gitignore deleted file mode 100644 index b044bd7..0000000 --- a/scripts/potoken_provider/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ - -bgutil-provider/node_modules \ No newline at end of file diff --git a/scripts/potoken_provider/setup_pot_provider.sh b/scripts/potoken_provider/setup_pot_provider.sh deleted file mode 100755 index b533ea3..0000000 --- a/scripts/potoken_provider/setup_pot_provider.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/bash -set -e - -SCRIPTS_DIR="scripts/potoken_provider" -TARGET_DIR="$SCRIPTS_DIR/bgutil-provider" -GEN_SCRIPT="$TARGET_DIR/build/generate_once.js" - -# Ensure the server directory exists -if [ ! -d "$TARGET_DIR" ]; then - echo "Error: PO Token provider server directory is missing! Please run scripts/update_pot_provider.sh first." - exit 1 -fi - -cd "$TARGET_DIR" || exit 1 - -# Check if dependencies need installation -if [ ! -d "node_modules" ]; then - echo "Installing dependencies..." - yarn install --frozen-lockfile -else - echo "Dependencies already installed. Skipping yarn install." -fi - -# Check if build directory exists and if transpiling is needed -if [ ! -d "build" ]; then - echo "Build directory missing or outdated. Running transpilation..." - npx tsc -else - echo "Build directory is up to date. Skipping transpilation." -fi - - -echo "PO Token provider script is ready for use." diff --git a/scripts/potoken_provider/update_pot_provider.sh b/scripts/potoken_provider/update_pot_provider.sh deleted file mode 100755 index 58113fc..0000000 --- a/scripts/potoken_provider/update_pot_provider.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash -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 of the POT generation script repo into temporary directory -git clone --depth 1 "$BGUTIL_REPO" "$BGUTIL_TEMP_DIR" - -# 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, -# 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 as we only needed the /server/ contents -echo "Cleaning up temporary files..." -rm -rf "$BGUTIL_TEMP_DIR" - -echo "PO Token provider script is ready in: $TARGET_DIR/build" -echo "Commit and push changes to include it in version control."