mirror of
https://github.com/bellingcat/auto-archiver.git
synced 2026-06-12 21:28:29 +03:00
Add update to POT setup script.
This commit is contained in:
@@ -3,12 +3,18 @@ set -e
|
|||||||
|
|
||||||
SCRIPTS_DIR="scripts/potoken_provider"
|
SCRIPTS_DIR="scripts/potoken_provider"
|
||||||
BGUTIL_DIR="$SCRIPTS_DIR/bgutil-ytdlp-pot-provider"
|
BGUTIL_DIR="$SCRIPTS_DIR/bgutil-ytdlp-pot-provider"
|
||||||
|
UPDATE=false
|
||||||
|
|
||||||
|
# Parse optional flag
|
||||||
|
if [[ "$1" == "--update" ]]; then
|
||||||
|
UPDATE=true
|
||||||
|
fi
|
||||||
|
|
||||||
# Clone the repository, or update if it exists
|
# Clone the repository, or update if it exists
|
||||||
if [ ! -d "$BGUTIL_DIR" ]; then
|
if [ ! -d "$BGUTIL_DIR" ]; then
|
||||||
echo "Cloning bgutil-ytdlp-pot-provider repository..."
|
echo "Cloning bgutil-ytdlp-pot-provider repository..."
|
||||||
git clone https://github.com/Brainicism/bgutil-ytdlp-pot-provider.git "$BGUTIL_DIR"
|
git clone https://github.com/Brainicism/bgutil-ytdlp-pot-provider.git "$BGUTIL_DIR"
|
||||||
else
|
elif [ "$UPDATE" == true ]; then
|
||||||
echo "Updating existing bgutil-ytdlp-pot-provider repository..."
|
echo "Updating existing bgutil-ytdlp-pot-provider repository..."
|
||||||
cd "$BGUTIL_DIR" || exit 1
|
cd "$BGUTIL_DIR" || exit 1
|
||||||
git pull origin master
|
git pull origin master
|
||||||
@@ -21,5 +27,5 @@ cd "$BGUTIL_DIR/server" || exit 1
|
|||||||
yarn install --frozen-lockfile
|
yarn install --frozen-lockfile
|
||||||
npx tsc
|
npx tsc
|
||||||
|
|
||||||
# The built script is now available
|
# The built script is now available and can be used by the generic extractor
|
||||||
echo "PO Token provider script is ready: $BGUTIL_DIR/server/build/generate_once.js"
|
echo "PO Token provider script is ready: $BGUTIL_DIR/server/build/generate_once.js"
|
||||||
|
|||||||
Reference in New Issue
Block a user