Created
July 13, 2023 09:37
-
-
Save shotastage/77c3f557c2ab0f11e5bf12827f060095 to your computer and use it in GitHub Desktop.
LpsBuild.sh
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 | |
cd $HOME | |
mkdir .LpsBuildTmp/ | |
cd .LpsBuildTmp/ | |
### Initialization | |
function Initialization () { | |
## Check command Initialization | |
if [ -e /usr/bin/LpsBuild ]; then | |
echo | |
else | |
echo "LpsBuild command is not installed." | |
echo "Installation of command will automatically go." | |
sudo touch /usr/bin/LpsBuild | |
sudo echo "bash $HOME/.LpsComponensts/scripts/LpsBuild.sh" >> /usr/bin/LpsBuild | |
EDIT | |
fi | |
echo "Installed build command, [Please restart this program.]" | |
exit | |
} | |
Initialization() | |
### Update | |
function Update () { | |
curl -O http://wp-dev-playground.96.lt/UserContents/LpsBuild/VERSION.vif | |
if [ -e VERSION.vif ]; then | |
source VERSION.vif | |
fi | |
if [$VERSION != 0]; then | |
curl -O http://wp-dev-playground.96.lt/UserContents/LpsBuild/LpsBuild.sh | |
sudo chmod -x LpsBuild.sh | |
mv LpsBuild.sh $HOME/.LpsComponensts/scripts/LpsBuild.sh | |
echo "Updated build script. [Please restart this program.]" | |
exit | |
fi | |
} | |
Update() | |
URL=https://github.com | |
echo "Auto deploy -- Ver 0.0.001" | |
echo "Enter user name:" | |
read user_name | |
echo "Enter package name:" | |
read pkg_name | |
git clone $URL/$user_name/$pkg_name.git | |
cd $pkg_name | |
swift build | |
if [ -e .build/ ]; then | |
tar cvfz deploy.tar.gz $pkg_name | |
mv deploy.tar.gz $HOME/deploy.tar.gz | |
echo "Deployed." | |
else | |
echo "Failed." | |
fi | |
rm -rf $HOME/.LpsBuildTmp/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment