瀏覽代碼

Always try to uninstall nodejs before installing it

Bob Mottram 8 年之前
父節點
當前提交
5d61b29d95
共有 1 個檔案被更改,包括 4 行新增4 行删除
  1. 4
    4
      src/freedombone-utils-nodejs

+ 4
- 4
src/freedombone-utils-nodejs 查看文件

149
 
149
 
150
     apt-get update
150
     apt-get update
151
 
151
 
152
-    if [ -f /usr/bin/nodejs ]; then
153
-        apt-get -yq remove --purge nodejs
154
-    fi
152
+    apt-get -yq remove --purge nodejs
153
+
155
     if [ -d /usr/local/lib/node_modules ]; then
154
     if [ -d /usr/local/lib/node_modules ]; then
156
         rm -rf /usr/local/lib/node_modules
155
         rm -rf /usr/local/lib/node_modules
157
     fi
156
     fi
165
         rm /usr/bin/nodejs
164
         rm /usr/bin/nodejs
166
     fi
165
     fi
167
 
166
 
168
-    apt-get -yq install nodejs curl
167
+    apt-get -yq install nodejs
168
+    apt-get -yq install curl
169
 
169
 
170
     if [ ! -f /usr/bin/nodejs ]; then
170
     if [ ! -f /usr/bin/nodejs ]; then
171
         echo $'nodejs was not installed'
171
         echo $'nodejs was not installed'