kopia lustrzana https://github.com/bellingcat/auto-archiver
Clarify comments in pot scripts.
rodzic
675de50ee7
commit
93921e71d4
|
@ -1,5 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e # Exit on error
|
set -e
|
||||||
|
|
||||||
SCRIPTS_DIR="scripts/potoken_provider"
|
SCRIPTS_DIR="scripts/potoken_provider"
|
||||||
TARGET_DIR="$SCRIPTS_DIR/bgutil-provider"
|
TARGET_DIR="$SCRIPTS_DIR/bgutil-provider"
|
||||||
|
@ -11,7 +11,6 @@ if [ ! -d "$TARGET_DIR" ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Move into the server directory
|
|
||||||
cd "$TARGET_DIR" || exit 1
|
cd "$TARGET_DIR" || exit 1
|
||||||
|
|
||||||
# Check if dependencies need installation
|
# Check if dependencies need installation
|
||||||
|
@ -31,12 +30,4 @@ else
|
||||||
fi
|
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."
|
echo "PO Token provider script is ready for use."
|
||||||
|
|
|
@ -1,26 +1,26 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e # Exit on error
|
set -e
|
||||||
|
|
||||||
SCRIPTS_DIR="scripts/potoken_provider"
|
SCRIPTS_DIR="scripts/potoken_provider"
|
||||||
TARGET_DIR="$SCRIPTS_DIR/bgutil-provider"
|
TARGET_DIR="$SCRIPTS_DIR/bgutil-provider"
|
||||||
BGUTIL_REPO="https://github.com/Brainicism/bgutil-ytdlp-pot-provider.git"
|
BGUTIL_REPO="https://github.com/Brainicism/bgutil-ytdlp-pot-provider.git"
|
||||||
BGUTIL_TEMP_DIR="$SCRIPTS_DIR/bgutil-temp"
|
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"
|
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"
|
rm -rf "$TARGET_DIR"
|
||||||
mkdir -p "$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..."
|
echo "Copy /server/ contents into $TARGET_DIR..."
|
||||||
cp -r "$BGUTIL_TEMP_DIR/server/"* "$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..."
|
echo "Cleaning up temporary files..."
|
||||||
rm -rf "$BGUTIL_TEMP_DIR"
|
rm -rf "$BGUTIL_TEMP_DIR"
|
||||||
|
|
||||||
# Confirm success
|
|
||||||
echo "PO Token provider script is ready in: $TARGET_DIR/build"
|
echo "PO Token provider script is ready in: $TARGET_DIR/build"
|
||||||
echo "Commit and push changes to include it in version control."
|
echo "Commit and push changes to include it in version control."
|
||||||
|
|
Ładowanie…
Reference in New Issue