From c10ca74b5b47104163eeb383141253220992b399 Mon Sep 17 00:00:00 2001 From: Tim Caswell Date: Thu, 5 May 2011 13:55:09 -0700 Subject: [PATCH] NVM shouldn't really be a NPM module --- install.sh | 22 ---------------------- package.json | 6 ------ uninstall.sh | 23 ----------------------- 3 files changed, 51 deletions(-) delete mode 100755 install.sh delete mode 100644 package.json delete mode 100755 uninstall.sh diff --git a/install.sh b/install.sh deleted file mode 100755 index d5a66cd..0000000 --- a/install.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash - -dir=$npm_config_root/.npm/$npm_package_name/$npm_package_version/package - -# add lines to the bashrc. -has=$(cat ~/.bashrc | egrep "^# ADDED BY npm FOR NVM$" || true) -if [ "x$has" != "x" ]; then - exit 0 -fi -cat <>~/.bashrc -# ADDED BY npm FOR NVM -. $dir/nvm.sh -# END ADDED BY npm FOR NVM -NVM_CODE - -cat <" -, "scripts" : - { "install" : "./install.sh" , "uninstall" : "./uninstall.sh" } -} diff --git a/uninstall.sh b/uninstall.sh deleted file mode 100755 index a139d2c..0000000 --- a/uninstall.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - - -has=$(cat ~/.bashrc | egrep "^# ADDED BY npm FOR NVM$" || true) -if [ "x$has" == "x" ]; then - echo "doesn't have it, exiting" - exit 0 -fi -tmp=~/.bashrc.tmp -cat ~/.bashrc | { - incode=0 - while read line; do - if [ "$line" == "# ADDED BY npm FOR NVM" ]; then - incode=1 - elif [ "$line" == "# END ADDED BY npm FOR NVM" ] \ - && [ $incode -eq 1 ]; then - incode=0 - elif [ $incode -eq 0 ]; then - echo "$line" >> $tmp - fi - done -} -mv $tmp ~/.bashrc