File tree Expand file tree Collapse file tree 3 files changed +12
-14
lines changed Expand file tree Collapse file tree 3 files changed +12
-14
lines changed Original file line number Diff line number Diff line change 1
1
[node ]
2
- installers = " apt,yum, dnf,apk"
2
+ installers = " dnf,apt, apk,yum "
3
3
name = " NodeJS"
4
+ description = " NodeJs v12"
4
5
5
6
[kubectl ]
6
7
installers = " apt,yum,curl"
Original file line number Diff line number Diff line change
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='[0m';RED='[0;31m';GREEN='[0;32m';YELLOW='[0;33m';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 $DNF_CMD ]; then;$SUDO dnf install -y gcc-c++ make;curl -sL https://rpm.nodesource.com/setup_12.x | $SUDO -E bash -;$SUDO dnf install nodejs;;elif [ ! -z $APT_GET_CMD ]; then;curl -sL https://deb.nodesource.com/setup_12.x | $SUDO -E bash -;$SUDO apt-get install -y nodejs;;elif [ ! -z $APK_CMD ]; then;$SUDO apk update;$SUDO apk add nodejs;;elif [ ! -z $YUM_CMD ]; then;$SUDO yum install nodejs12;;else echo "Couldn't install package";exit 1;;fi;
Original file line number Diff line number Diff line change @@ -40,27 +40,22 @@ error () {
40
40
log " $RED ERROR$RESET $1 "
41
41
}
42
42
43
- if [ ! -z $APT_GET_CMD ]; then
44
- if [ -n " $( uname -a | grep Ubuntu) " ]; then
45
- curl -sL https://deb.nodesource.com/setup_12.x | $SUDO -E bash -
46
- $SUDO apt-get install -y nodejs
47
- else
48
- curl -sL https://deb.nodesource.com/setup_12.x | bash -
49
- $SUDO apt-get install -y nodejs
50
- fi
51
-
52
- elif [ ! -z $YUM_CMD ]; then
53
- $SUDO yum install nodejs12
54
-
55
- elif [ ! -z $DNF_CMD ]; then
43
+ if [ ! -z $DNF_CMD ]; then
56
44
$SUDO dnf install -y gcc-c++ make
57
45
curl -sL https://rpm.nodesource.com/setup_12.x | $SUDO -E bash -
58
46
$SUDO dnf install nodejs
59
47
48
+ elif [ ! -z $APT_GET_CMD ]; then
49
+ curl -sL https://deb.nodesource.com/setup_12.x | $SUDO -E bash -
50
+ $SUDO apt-get install -y nodejs
51
+
60
52
elif [ ! -z $APK_CMD ]; then
61
53
$SUDO apk update
62
54
$SUDO apk add nodejs
63
55
56
+ elif [ ! -z $YUM_CMD ]; then
57
+ $SUDO yum install nodejs12
58
+
64
59
else
65
60
echo " Couldn't install package"
66
61
exit 1;
You can’t perform that action at this time.
0 commit comments