Add Shebang for tools Script

This commit is contained in:
Zen Wen
2025-08-30 14:26:07 +08:00
parent e1fd28f595
commit e4950bbbe6
3 changed files with 27 additions and 24 deletions

View File

@@ -1,18 +1,18 @@
#/bin/bash
#!/bin/bash
repo_url="https://github.com/go-acme/lego"
# Check if the folder "./lego" exists
if [ -d "./lego" ]; then
# If the folder exists, change into it and perform a git pull
echo "Folder './lego' exists. Pulling updates..."
cd "./lego" || exit
git pull
cd ../
# If the folder exists, change into it and perform a git pull
echo "Folder './lego' exists. Pulling updates..."
cd "./lego" || exit
git pull
cd ../
else
# If the folder doesn't exist, clone the repository
echo "Folder './lego' does not exist. Cloning the repository..."
git clone "$repo_url" "./lego" || exit
# If the folder doesn't exist, clone the repository
echo "Folder './lego' does not exist. Cloning the repository..."
git clone "$repo_url" "./lego" || exit
fi
# Run the extract.go to get all the config from lego source code
@@ -25,4 +25,5 @@ sleep 2
# Comment the line below if you dont want to pull everytime update
# This is to help go compiler to not load all the lego source file when compile
#rm -rf ./lego/
echo "Config generated"
echo "Config generated"