-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from Megapixel99/develop
Bumped version to 1.0.2 and added build script
- Loading branch information
Showing
5 changed files
with
72 additions
and
9 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# Licensed under Apache Version 2.0 | ||
# Please see the LICENSE file in the root directory of the project for more | ||
# information | ||
|
||
#!/usr/bin/env bash | ||
|
||
if [ "$(whoami)" != "root" ] | ||
then | ||
echo "The root user is required to install the packages required to build the application" | ||
echo "Please enter your password to continue" | ||
sudo -s | ||
fi | ||
|
||
if ! foobar_loc="$(type -p "npm")" || [[ -z $foobar_loc ]]; then | ||
echo "Could not find npm, please install npm" | ||
echo "" | ||
else | ||
echo "Installing the projects' dependencies..." | ||
npm install -s | ||
while ! foobar_loc="$(type -p "pkg")" || [[ -z $foobar_loc ]] | ||
do | ||
read -p "Could not find pkg, which is reqiured to build GAM. Do you want to install pkg? (y/n)" choice | ||
case "$choice" in | ||
y|Y|yes|Yes ) sudo npm i -g pkg -s | ||
echo "Installed pkg successfully";; | ||
n|N|no|No ) echo "pkg is required to build, exiting program";; | ||
* ) echo "Invalid response, please try again";; | ||
esac | ||
done | ||
fi | ||
|
||
echo "" | ||
mkdir -p binarys | ||
echo "Creating binarys..." | ||
echo "" | ||
pkg --out-path $PWD/binarys $PWD/src/manager.js | ||
echo "Created binarys successfully" | ||
echo "" | ||
|
||
while true | ||
do | ||
read -p "Do you want to uninstall pkg? (y/n)" choice | ||
case "$choice" in | ||
y|Y|yes|Yes ) sudo npm i -g pkg -s | ||
echo "Uninstalled pkg successfully" | ||
break;; | ||
n|N|no|No ) break;; | ||
* ) echo "Invalid response, please try again";; | ||
esac | ||
done |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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