Skip to content

Instantly share code, notes, and snippets.

@aisyshk
Last active October 27, 2023 06:11
Show Gist options
  • Save aisyshk/ed52cc9a5e9cf35c63ce084c98924599 to your computer and use it in GitHub Desktop.
Save aisyshk/ed52cc9a5e9cf35c63ce084c98924599 to your computer and use it in GitHub Desktop.
AoT Wiki site updater
#!/bin/bash
repo_url="https://github.com/aisyshk/AoT-Wiki.git"
download_dir="$HOME"
target_dir="/var/www/aot.wiki/html/"
if [ ! -d "$download_dir" ]; then
mkdir -p "$download_dir"
fi
if [ ! -d "$target_dir" ]; then
mkdir -p "$target_dir"
fi
cd "$download_dir"
git clone "$repo_url"
cd "AoT-Wiki"
mv -v /assets "$target_dir"
mv -v index.html "$target_dir"
mv -v timer.html "$target_dir"
cd ..
rm -rf AoT-Wiki
if [ $? -eq 0 ]; then
echo "Downloaded the website files."
else
echo "Failed to download website files."
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment