Skip to content

Commit 2152cd2

Browse files
authored
update README.md & installers.toml
1 parent 84b817b commit 2152cd2

File tree

4 files changed

+87
-27
lines changed

4 files changed

+87
-27
lines changed

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,14 @@ This will install Git on your machine!
2222
<!-- beginning of tools list -->
2323
| Tool |Apt|Yum|Packman|APK|DNF|CURL| URL |
2424
|--------|---|---|-------|---|---|----|----------------------------|
25-
|Git |Yes|Yes|Yes |Yes|Yes|No |https://installer.to/git |
26-
|Hello |Yes|Yes|Yes |Yes|Yes|Yes |https://installer.to/hello |
2725
|NodeJS |Yes|Yes|No |Yes|Yes|No |https://installer.to/node |
28-
|Python 3|Yes|Yes|Yes |Yes|Yes|No |https://installer.to/python3|
29-
|Nginx |Yes|Yes|Yes |Yes|Yes|No |https://installer.to/nginx |
26+
|Git |Yes|Yes|Yes |Yes|Yes|No |https://installer.to/git |
3027
|gCloud |No |No |No |No |No |Yes |https://installer.to/gcloud |
31-
|Docker |Yes|Yes|No |No |No |No |https://installer.to/docker |
28+
|Nginx |Yes|Yes|Yes |Yes|Yes|No |https://installer.to/nginx |
3229
|Fabric |No |No |No |No |No |Yes |https://installer.to/hlf |
30+
|Docker |Yes|Yes|No |No |No |No |https://installer.to/docker |
31+
|cTop |No |No |No |No |No |Yes |https://installer.to/ctop |
32+
|Hello |Yes|Yes|Yes |Yes|Yes|Yes |https://installer.to/hello |
33+
|Python 3|Yes|Yes|Yes |Yes|Yes|No |https://installer.to/python3|
3334

3435
<!-- end of tools list -->

installers.toml

Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,43 @@
1+
[node]
2+
installers = "apt,yum,dnf,apk"
3+
name = "NodeJS"
4+
15
[git]
2-
name = "Git"
36
installers = "apt,yum,pacman,dnf,apk"
7+
name = "Git"
48
description = "Git SVM"
59

6-
[hello]
7-
name = "Hello"
8-
installers = "apt,yum,pacman,apk,dnf,curl"
9-
description = "This is just a sample tool"
10-
11-
[node]
12-
name = "NodeJS"
13-
installers = "apt,yum,dnf,apk"
14-
15-
[python3]
16-
name = "Python 3"
17-
description = "Python 3"
18-
installers = "apt,yum,pacman,apk,dnf"
10+
[gcloud]
11+
installers = "curl"
12+
name = "gCloud"
13+
description = "CLI tool of GCP"
1914

2015
[nginx]
16+
installers = "apt,yum,pacman,apk,dnf"
2117
name = "Nginx"
2218
description = "Nginx server"
23-
installers = "apt,yum,pacman,apk,dnf"
2419

25-
[gcloud]
26-
name = "gCloud"
27-
description = "CLI tool of GCP"
20+
[hlf]
2821
installers = "curl"
22+
name = "Fabric"
23+
description = "Hyperledger Fabric"
2924

3025
[docker]
26+
installers = "apt,yum"
3127
name = "Docker"
3228
description = "Docker"
33-
installers = "apt,yum"
3429

35-
[hlf]
36-
name = "Fabric"
37-
description = "Hyperledger Fabric"
30+
[ctop]
3831
installers = "curl"
32+
name = "cTop"
33+
description = "Top-like interface for container metrics"
34+
35+
[hello]
36+
installers = "apt,yum,pacman,apk,dnf,curl"
37+
name = "Hello"
38+
description = "This is just a sample tool"
39+
40+
[python3]
41+
installers = "apt,yum,pacman,apk,dnf"
42+
name = "Python 3"
43+
description = "Python 3"

installers/ctop/installer.min.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/sh
2+
;CURL_CMD=$(which curl);YUM_CMD=$(which yum);DNF_CMD=$(which dnf);APT_GET_CMD=$(which apt-get);PACMAN_CMD=$(which pacman);APK_CMD=$(which apk);GIT_CMD=$(which git);SUDO_CMD=$(which sudo);;USER="$(id -un 2>/dev/null || true)";SUDO='';if [ "$USER" != 'root' ]; then;if [ ! -z $SUDO_CMD ]; then;SUDO='sudo';else cat >&2 <<-'EOF';Error: this installer needs the ability to run commands as root.;We are unable to find "sudo". Make sure its available to make this happen;EOF;exit 1;fi;fi;;RESET='';RED='';GREEN='';YELLOW='';log () { echo "[`date "+%Y.%m.%d-%H:%M:%S%Z"`]$1 $2"; };info () { log "$GREEN INFO$RESET $1"; };warn () { log "$YELLOW WARN$RESET $1"; };error () { log "$RED ERROR$RESET $1"; };;if [ ! -z $CURL_CMD ]; then;info "Downloading cTop ........";$SUDO curl -sSL https://github.com/bcicen/ctop/releases/download/v0.7.3/ctop-0.7.3-linux-amd64 -O /usr/local/bin/ctop;info "Setting up at /usr/local/bin/ctop";$SUDO chmod +x /usr/local/bin/ctop;;else echo "Couldn't install package";exit 1;;fi;

installers/ctop/installer.sh

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
#!/bin/sh
2+
3+
CURL_CMD=$(which curl)
4+
YUM_CMD=$(which yum)
5+
DNF_CMD=$(which dnf)
6+
APT_GET_CMD=$(which apt-get)
7+
PACMAN_CMD=$(which pacman)
8+
APK_CMD=$(which apk)
9+
GIT_CMD=$(which git)
10+
SUDO_CMD=$(which sudo)
11+
12+
USER="$(id -un 2>/dev/null || true)"
13+
SUDO=''
14+
if [ "$USER" != 'root' ]; then
15+
if [ ! -z $SUDO_CMD ]; then
16+
SUDO='sudo'
17+
else
18+
cat >&2 <<-'EOF'
19+
Error: this installer needs the ability to run commands as root.
20+
We are unable to find "sudo". Make sure its available to make this happen
21+
EOF
22+
exit 1
23+
fi
24+
fi
25+
26+
RESET=''
27+
RED=''
28+
GREEN=''
29+
YELLOW=''
30+
log () {
31+
echo "[`date "+%Y.%m.%d-%H:%M:%S%Z"`]$1 $2"
32+
}
33+
info () {
34+
log "$GREEN INFO$RESET $1"
35+
}
36+
warn () {
37+
log "$YELLOW WARN$RESET $1"
38+
}
39+
error () {
40+
log "$RED ERROR$RESET $1"
41+
}
42+
43+
if [ ! -z $CURL_CMD ]; then
44+
info "Downloading cTop ........"
45+
$SUDO curl -sSL https://github.com/bcicen/ctop/releases/download/v0.7.3/ctop-0.7.3-linux-amd64 -O /usr/local/bin/ctop
46+
info "Setting up at /usr/local/bin/ctop"
47+
$SUDO chmod +x /usr/local/bin/ctop
48+
49+
else
50+
echo "Couldn't install package"
51+
exit 1;
52+
fi

0 commit comments

Comments
 (0)