Last active
October 27, 2023 06:11
-
-
Save aisyshk/ed52cc9a5e9cf35c63ce084c98924599 to your computer and use it in GitHub Desktop.
AoT Wiki site updater
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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