-
Notifications
You must be signed in to change notification settings - Fork 0
/
plugz
58 lines (51 loc) · 1.67 KB
/
plugz
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
50
51
52
53
54
55
56
57
58
#!/bin/bash
nm="Plugz"
vs="r1"
plugzlrversion="""
\e[1;42m $nm \e[0m\e[100m version $vs \e[0m
Get build recipes from JSON files, parse source-code and binary links from both centralized and decentralized sources, do different builds to different targets.
\e[100m Projected early this year. but created in 11-15-2019 by Daniell Mesquita \e[0m
"""
if [ ! -f /usr/lib/plugz/projects.json ]; then
echo ""
echo "It looks like its your first time using $nm"
echo ""
echo "Initializing..."
cat > /usr/lib/plugz/projects.json <<EOF
{
"projects": [{}]
}
EOF
echo "Done!"
fi
fi
if [ "$1" = "" ]; then
echo "$plugzversion"
echo "Type 'plugz --help' (without quotes) to see a list of available commands."
fi
# displays help message with a list of commands:
if [ "$1" = "--help" ] || [ "$1" = "-h" ]; then
echo " \e[1;42m $nm $vs \e[0m"
echo "Use these commands after/together with 'plugz' command."
echo "Available commands:"
echo "Information:"
echo " --help, -h Shows all available commands"
echo " --version, -v Shows the version of $nm"
fi
if [ "$1" = "--version" ] || [ "$1" = "-v" ]; then
echo "$vs"
fi
function recipe_not_empty {
echo "Tell the name/ID your project will have. Don't use spaces nor special characters. Sample valid name: web3updater"
echo -n "Write bellow your project's name: "
read projnameid
}
if [ "$1" = "init" ]; then
if [ -s recipe.json ]
then
echo "Lets turn your project Plugz-ready!"
recipe_not_empty
else
echo "recipe.json is empty! Please fill it properly before initiating. Documentation, soon"
fi
fi