-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcanteen
executable file
·49 lines (44 loc) · 1.71 KB
/
canteen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/usr/bin/env bash
ProductName="Canteen"
ProductVersion=1.0.0
ProductMaster=false
ProductPathDirectory="$( cd "$( dirname $0 )" && pwd )"
ProductDependentPath="$ProductPathDirectory/.canteen"
if [ -f ".enablepublish" ]; then
export ProductMaster=true
fi
function Get-Script() {
chmod +x "$1/canteen.sh"
chmod +x $ProductDependentPath/loader.sh
bash "$ProductDependentPath/loader.sh" "$1"
}
clear
echo "== PASSING CONTROL TO CANTEEN =="
function canteen() {
if [ "$ProductMaster" = "true" ]; then
echo "$ProductName v$ProductVersion by DanningtonSystems (PUBLISHER MODE ENABLED)"
else
echo "$ProductName v$ProductVersion by DanningtonSystems"
fi
echo "Select a recipe to build:"
echo "1. developer/alpine:latest (developer:alpine-latest)"
echo "2. developer/ubuntu:latest (developer:ubuntu-latest)"
echo "3. pterodactyl/nodejs (nodejs:*)"
read -p "Select the number corresponding to the recipe that should be built, or press CTRL+C (^C) to exit: " InputTag
if [[ "$InputTag" == "1" ]]; then
echo "Building developer:alpine-latest from developer/alpine:latest..."
Get-Script $ProductPathDirectory/developer/alpine/latest
elif [[ "$InputTag" == "2" ]]; then
echo "Building debian/ubuntu-latest from developer/debian:ubuntu-latest..."
Get-Script $ProductPathDirectory/developer/ubuntu/latest
elif [[ "$InputTag" == "3" ]]; then
echo "Building pterodactyl/nodejs from pterodactyl/nodejs:*..."
Get-Script $ProductPathDirectory/pterodactyl/nodejs
else
clear
echo "The option that you chose was invalid. Please input a valid option."
canteen
fi
}
canteen
echo "== RESTORING CONTROL TO SHELL =="