Browse Source

cleanup base _node_pkg, cleanup base _python_pkg

Kyle Davis 8 years ago
parent
commit
452ab4fa1d
2 changed files with 8 additions and 6 deletions
  1. 7 4
      gimmes/_node_pkg
  2. 1 2
      gimmes/_python_pkg

+ 7 - 4
gimmes/_node_pkg

@@ -2,8 +2,11 @@
 set -o errexit -o pipefail
 
 PKG=${0##*/}
-if [[ "$OS" = "Darwin" ]]; then
-	has "$PKG"  ||  npm install -g "$PKG"
-else
-	has "$PKG"  ||  sudo npm install -g "$PKG"
+if ! has "$PKG"; then
+	gimme node
+	if [[ "$OS" = "Darwin" ]]; then
+		npm install -g "$PKG"
+	else
+		sudo npm install -g "$PKG"
+	fi
 fi

+ 1 - 2
gimmes/_python_pkg

@@ -1,10 +1,9 @@
 #!/bin/bash
 set -o errexit -o pipefail
 
-gimme pip
-
 PKG=${0##*/}
 if ! has "$PKG" && ! python -c "import $PKG" &>/dev/null; then
+	gimme pip
 	if [[ "$OS" = "Darwin" ]]; then
 		pip install --user "$PKG"
 	else