update pip & npm
pip: #add module to do_not_update array npm: #add help to install
This commit is contained in:
13
_npm.sh
13
_npm.sh
@@ -3,6 +3,19 @@
|
|||||||
# npm plugin for KYMSU (install local package)
|
# npm plugin for KYMSU (install local package)
|
||||||
# https://github.com/welcoMattic/kymsu
|
# https://github.com/welcoMattic/kymsu
|
||||||
|
|
||||||
|
# Fixing npm On Mac OS X for Homebrew Users
|
||||||
|
# https://gist.github.com/rcugut/c7abd2a425bb65da3c61d8341cd4b02d
|
||||||
|
# https://gist.github.com/DanHerbert/9520689
|
||||||
|
|
||||||
|
# brew install node
|
||||||
|
# node -v => 9.11.1
|
||||||
|
# npm -v => 5.6.0
|
||||||
|
|
||||||
|
# npm install -g npm
|
||||||
|
# npm -v => 5.8.0
|
||||||
|
|
||||||
|
# https://github.com/npm/npm/issues/17744
|
||||||
|
|
||||||
echo " 🌿 npm"
|
echo " 🌿 npm"
|
||||||
cd /Users/bruno/Sites/node_modules/
|
cd /Users/bruno/Sites/node_modules/
|
||||||
npm ls
|
npm ls
|
||||||
|
|||||||
8
_pip.sh
8
_pip.sh
@@ -7,6 +7,8 @@
|
|||||||
version=pip3
|
version=pip3
|
||||||
#user: "" or "--user"
|
#user: "" or "--user"
|
||||||
user=""
|
user=""
|
||||||
|
#add module to do_not_update array
|
||||||
|
declare -a do_not_update=( "tornado")
|
||||||
|
|
||||||
if ! [ -x "$(command -v $version)" ]; then
|
if ! [ -x "$(command -v $version)" ]; then
|
||||||
echo "Error: $version is not installed." >&2
|
echo "Error: $version is not installed." >&2
|
||||||
@@ -54,6 +56,11 @@ if [ -n "$upd" ]; then
|
|||||||
done <<< "$dependencies"
|
done <<< "$dependencies"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# si la m-à-j n'est pas dans le tableau do_not_update, on propose de l'installer
|
||||||
|
|
||||||
|
FOUND=`echo ${do_not_update[*]} | grep "$i"`
|
||||||
|
if [ "${FOUND}" = "" ]; then
|
||||||
|
|
||||||
b=$(echo -e "Do you wanna run \033[1m$version install $user --upgrade "$i"\033[0m ? (y/n)")
|
b=$(echo -e "Do you wanna run \033[1m$version install $user --upgrade "$i"\033[0m ? (y/n)")
|
||||||
read -p "$b" choice
|
read -p "$b" choice
|
||||||
case "$choice" in
|
case "$choice" in
|
||||||
@@ -63,6 +70,7 @@ if [ -n "$upd" ]; then
|
|||||||
esac
|
esac
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user