mirror of https://github.com/harish2704/dotFiles
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
352 B
16 lines
352 B
#!/bin/bash
|
|
|
|
NPM_DIR=~/node_modules;
|
|
TARGET_BIN_PATH=~/.local/bin;
|
|
PACKAGES_WITH_BIN=$( find "$NPM_DIR" -name 'bin' );
|
|
|
|
cd $TARGET_BIN_PATH;
|
|
for i in $PACKAGES_WITH_BIN;do
|
|
echo "module: $i";
|
|
commands=$(ls $i);
|
|
echo "Commands: $commands";
|
|
for commandName in $commands;do
|
|
ln -s "$i/$commandName" "./$commandName";
|
|
done
|
|
done
|
|
|
|
|