File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -42,13 +42,13 @@ check_os() {
4242install_pre_reqs () {
4343 log " Installing pre-requisites" " info"
4444
45- # Run 'apt update'
46- if ! apt update -y; then
47- handle_error " $? " " Failed to run 'apt update'"
45+ # Run 'apt-get update'
46+ if ! apt-get update -y; then
47+ handle_error " $? " " Failed to run 'apt-get update'"
4848 fi
4949
50- # Run 'apt install'
51- if ! apt install -y apt-transport-https ca-certificates curl gnupg; then
50+ # Run 'apt-get install'
51+ if ! apt-get install -y apt-transport-https ca-certificates curl gnupg; then
5252 handle_error " $? " " Failed to install packages"
5353 fi
5454
9999 echo " Pin: origin deb.nodesource.com" | tee -a /etc/apt/preferences.d/nodejs > /dev/null
100100 echo " Pin-Priority: 600" | tee -a /etc/apt/preferences.d/nodejs > /dev/null
101101
102- # Run 'apt update'
103- if ! apt update -y; then
104- handle_error " $? " " Failed to run 'apt update'"
102+ # Run 'apt-get update'
103+ if ! apt-get update -y; then
104+ handle_error " $? " " Failed to run 'apt-get update'"
105105 else
106106 log " Repository configured successfully."
107107 log " To install Node.js, run: apt install nodejs -y" " info"
Original file line number Diff line number Diff line change @@ -113,13 +113,13 @@ check_os() {
113113install_pre_reqs () {
114114 log " Installing pre-requisites" " info"
115115
116- # Run 'apt update'
117- if ! apt update -y; then
118- handle_error " $? " " Failed to run 'apt update'"
116+ # Run 'apt-get update'
117+ if ! apt-get update -y; then
118+ handle_error " $? " " Failed to run 'apt-get update'"
119119 fi
120120
121- # Run 'apt install'
122- if ! apt install -y apt-transport-https ca-certificates curl gnupg; then
121+ # Run 'apt-get install'
122+ if ! apt-get install -y apt-transport-https ca-certificates curl gnupg; then
123123 handle_error " $? " " Failed to install packages"
124124 fi
125125
@@ -152,9 +152,9 @@ configure_repo() {
152152 echo " Pin: origin deb.nodesource.com" | tee -a /etc/apt/preferences.d/nodejs > /dev/null
153153 echo " Pin-Priority: 600" | tee -a /etc/apt/preferences.d/nodejs > /dev/null
154154
155- # Run 'apt update'
156- if ! apt update -y; then
157- handle_error " $? " " Failed to run 'apt update'"
155+ # Run 'apt-get update'
156+ if ! apt-get update -y; then
157+ handle_error " $? " " Failed to run 'apt-get update'"
158158 else
159159 log " Repository configured successfully. To install Node.js, run: apt install nodejs -y" " success"
160160 fi
Original file line number Diff line number Diff line change @@ -68,13 +68,13 @@ check_os() {
6868install_pre_reqs () {
6969 log " Installing pre-requisites" " info"
7070
71- # Run 'apt update'
72- if ! apt update -y; then
73- handle_error " $? " " Failed to run 'apt update'"
71+ # Run 'apt-get update'
72+ if ! apt-get update -y; then
73+ handle_error " $? " " Failed to run 'apt-get update'"
7474 fi
7575
76- # Run 'apt install'
77- if ! apt install -y apt-transport-https ca-certificates curl gnupg; then
76+ # Run 'apt-get install'
77+ if ! apt-get install -y apt-transport-https ca-certificates curl gnupg; then
7878 handle_error " $? " " Failed to install packages"
7979 fi
8080
@@ -117,9 +117,9 @@ configure_repo() {
117117 echo " Pin: origin deb.nodesource.com" | tee -a /etc/apt/preferences.d/nodejs > /dev/null
118118 echo " Pin-Priority: 600" | tee -a /etc/apt/preferences.d/nodejs > /dev/null
119119
120- # Run 'apt update'
121- if ! apt update -y; then
122- handle_error " $? " " Failed to run 'apt update'"
120+ # Run 'apt-get update'
121+ if ! apt-get update -y; then
122+ handle_error " $? " " Failed to run 'apt-get update'"
123123 else
124124 log " Repository configured successfully."
125125 log " To install Node.js, run: apt install nodejs -y" " info"
Original file line number Diff line number Diff line change @@ -42,13 +42,13 @@ check_os() {
4242install_pre_reqs () {
4343 log " Installing pre-requisites" " info"
4444
45- # Run 'apt update'
46- if ! apt update -y; then
47- handle_error " $? " " Failed to run 'apt update'"
45+ # Run 'apt-get update'
46+ if ! apt-get update -y; then
47+ handle_error " $? " " Failed to run 'apt-get update'"
4848 fi
4949
50- # Run 'apt install'
51- if ! apt install -y apt-transport-https ca-certificates curl gnupg; then
50+ # Run 'apt-get install'
51+ if ! apt-get install -y apt-transport-https ca-certificates curl gnupg; then
5252 handle_error " $? " " Failed to install packages"
5353 fi
5454
9999 echo " Pin: origin deb.nodesource.com" | tee -a /etc/apt/preferences.d/nodejs > /dev/null
100100 echo " Pin-Priority: 600" | tee -a /etc/apt/preferences.d/nodejs > /dev/null
101101
102- # Run 'apt update'
103- if ! apt update -y; then
104- handle_error " $? " " Failed to run 'apt update'"
102+ # Run 'apt-get update'
103+ if ! apt-get update -y; then
104+ handle_error " $? " " Failed to run 'apt-get update'"
105105 else
106106 log " Repository configured successfully."
107107 log " To install Node.js, run: apt install nodejs -y" " info"
Original file line number Diff line number Diff line change @@ -42,13 +42,13 @@ check_os() {
4242install_pre_reqs () {
4343 log " Installing pre-requisites" " info"
4444
45- # Run 'apt update'
46- if ! apt update -y; then
47- handle_error " $? " " Failed to run 'apt update'"
45+ # Run 'apt-get update'
46+ if ! apt-get update -y; then
47+ handle_error " $? " " Failed to run 'apt-get update'"
4848 fi
4949
50- # Run 'apt install'
51- if ! apt install -y apt-transport-https ca-certificates curl gnupg; then
50+ # Run 'apt-get install'
51+ if ! apt-get install -y apt-transport-https ca-certificates curl gnupg; then
5252 handle_error " $? " " Failed to install packages"
5353 fi
5454
@@ -91,9 +91,9 @@ configure_repo() {
9191 echo " Pin: origin deb.nodesource.com" | tee -a /etc/apt/preferences.d/nodejs > /dev/null
9292 echo " Pin-Priority: 600" | tee -a /etc/apt/preferences.d/nodejs > /dev/null
9393
94- # Run 'apt update'
95- if ! apt update -y; then
96- handle_error " $? " " Failed to run 'apt update'"
94+ # Run 'apt-get update'
95+ if ! apt-get update -y; then
96+ handle_error " $? " " Failed to run 'apt-get update'"
9797 else
9898 log " Repository configured successfully."
9999 log " To install Node.js, run: apt install nodejs -y" " info"
Original file line number Diff line number Diff line change @@ -42,13 +42,13 @@ check_os() {
4242install_pre_reqs () {
4343 log " Installing pre-requisites" " info"
4444
45- # Run 'apt update'
46- if ! apt update -y; then
47- handle_error " $? " " Failed to run 'apt update'"
45+ # Run 'apt-get update'
46+ if ! apt-get update -y; then
47+ handle_error " $? " " Failed to run 'apt-get update'"
4848 fi
4949
50- # Run 'apt install'
51- if ! apt install -y apt-transport-https ca-certificates curl gnupg; then
50+ # Run 'apt-get install'
51+ if ! apt-get install -y apt-transport-https ca-certificates curl gnupg; then
5252 handle_error " $? " " Failed to install packages"
5353 fi
5454
9999 echo " Pin: origin deb.nodesource.com" | tee -a /etc/apt/preferences.d/nodejs > /dev/null
100100 echo " Pin-Priority: 600" | tee -a /etc/apt/preferences.d/nodejs > /dev/null
101101
102- # Run 'apt update'
103- if ! apt update -y; then
104- handle_error " $? " " Failed to run 'apt update'"
102+ # Run 'apt-get update'
103+ if ! apt-get update -y; then
104+ handle_error " $? " " Failed to run 'apt-get update'"
105105 else
106106 log " Repository configured successfully."
107107 log " To install Node.js, run: apt install nodejs -y" " info"
Original file line number Diff line number Diff line change @@ -42,13 +42,13 @@ check_os() {
4242install_pre_reqs () {
4343 log " Installing pre-requisites" " info"
4444
45- # Run 'apt update'
46- if ! apt update -y; then
47- handle_error " $? " " Failed to run 'apt update'"
45+ # Run 'apt-get update'
46+ if ! apt-get update -y; then
47+ handle_error " $? " " Failed to run 'apt-get update'"
4848 fi
4949
50- # Run 'apt install'
51- if ! apt install -y apt-transport-https ca-certificates curl gnupg; then
50+ # Run 'apt-get install'
51+ if ! apt-get install -y apt-transport-https ca-certificates curl gnupg; then
5252 handle_error " $? " " Failed to install packages"
5353 fi
5454
9999 echo " Pin: origin deb.nodesource.com" | tee -a /etc/apt/preferences.d/nodejs > /dev/null
100100 echo " Pin-Priority: 600" | tee -a /etc/apt/preferences.d/nodejs > /dev/null
101101
102- # Run 'apt update'
103- if ! apt update -y; then
104- handle_error " $? " " Failed to run 'apt update'"
102+ # Run 'apt-get update'
103+ if ! apt-get update -y; then
104+ handle_error " $? " " Failed to run 'apt-get update'"
105105 else
106106 log " Repository configured successfully."
107107 log " To install Node.js, run: apt install nodejs -y" " info"
Original file line number Diff line number Diff line change @@ -42,13 +42,13 @@ check_os() {
4242install_pre_reqs () {
4343 log " Installing pre-requisites" " info"
4444
45- # Run 'apt update'
46- if ! apt update -y; then
47- handle_error " $? " " Failed to run 'apt update'"
45+ # Run 'apt-get update'
46+ if ! apt-get update -y; then
47+ handle_error " $? " " Failed to run 'apt-get update'"
4848 fi
4949
50- # Run 'apt install'
51- if ! apt install -y apt-transport-https ca-certificates curl gnupg; then
50+ # Run 'apt-get install'
51+ if ! apt-get install -y apt-transport-https ca-certificates curl gnupg; then
5252 handle_error " $? " " Failed to install packages"
5353 fi
5454
9999 echo " Pin: origin deb.nodesource.com" | tee -a /etc/apt/preferences.d/nodejs > /dev/null
100100 echo " Pin-Priority: 600" | tee -a /etc/apt/preferences.d/nodejs > /dev/null
101101
102- # Run 'apt update'
103- if ! apt update -y; then
104- handle_error " $? " " Failed to run 'apt update'"
102+ # Run 'apt-get update'
103+ if ! apt-get update -y; then
104+ handle_error " $? " " Failed to run 'apt-get update'"
105105 else
106106 log " Repository configured successfully."
107107 log " To install Node.js, run: apt install nodejs -y" " info"
Original file line number Diff line number Diff line change @@ -42,13 +42,13 @@ check_os() {
4242install_pre_reqs () {
4343 log " Installing pre-requisites" " info"
4444
45- # Run 'apt update'
46- if ! apt update -y; then
47- handle_error " $? " " Failed to run 'apt update'"
45+ # Run 'apt-get update'
46+ if ! apt-get update -y; then
47+ handle_error " $? " " Failed to run 'apt-get update'"
4848 fi
4949
50- # Run 'apt install'
51- if ! apt install -y apt-transport-https ca-certificates curl gnupg; then
50+ # Run 'apt-get install'
51+ if ! apt-get install -y apt-transport-https ca-certificates curl gnupg; then
5252 handle_error " $? " " Failed to install packages"
5353 fi
5454
9999 echo " Pin: origin deb.nodesource.com" | tee -a /etc/apt/preferences.d/nodejs > /dev/null
100100 echo " Pin-Priority: 600" | tee -a /etc/apt/preferences.d/nodejs > /dev/null
101101
102- # Run 'apt update'
103- if ! apt update -y; then
104- handle_error " $? " " Failed to run 'apt update'"
102+ # Run 'apt-get update'
103+ if ! apt-get update -y; then
104+ handle_error " $? " " Failed to run 'apt-get update'"
105105 else
106106 log " Repository configured successfully."
107107 log " To install Node.js, run: apt install nodejs -y" " info"
Original file line number Diff line number Diff line change @@ -42,13 +42,13 @@ check_os() {
4242install_pre_reqs () {
4343 log " Installing pre-requisites" " info"
4444
45- # Run 'apt update'
46- if ! apt update -y; then
47- handle_error " $? " " Failed to run 'apt update'"
45+ # Run 'apt-get update'
46+ if ! apt-get update -y; then
47+ handle_error " $? " " Failed to run 'apt-get update'"
4848 fi
4949
50- # Run 'apt install'
51- if ! apt install -y apt-transport-https ca-certificates curl gnupg; then
50+ # Run 'apt-get install'
51+ if ! apt-get install -y apt-transport-https ca-certificates curl gnupg; then
5252 handle_error " $? " " Failed to install packages"
5353 fi
5454
9999 echo " Pin: origin deb.nodesource.com" | tee -a /etc/apt/preferences.d/nodejs > /dev/null
100100 echo " Pin-Priority: 600" | tee -a /etc/apt/preferences.d/nodejs > /dev/null
101101
102- # Run 'apt update'
103- if ! apt update -y; then
104- handle_error " $? " " Failed to run 'apt update'"
102+ # Run 'apt-get update'
103+ if ! apt-get update -y; then
104+ handle_error " $? " " Failed to run 'apt-get update'"
105105 else
106106 log " Repository configured successfully."
107107 log " To install Node.js, run: apt install nodejs -y" " info"
You can’t perform that action at this time.
0 commit comments