Created
April 11, 2021 09:14
-
-
Save p77u4n/58eeeff53dd6336856ae6e2309e34fe0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
ROOT_DIR=$1 | |
ABS_PATH_ROOT_DIR=$(realpath $ROOT_DIR) | |
echo $ABS_PATH_ROOT_DIR | |
if [ ! -d $ABS_PATH_ROOT_DIR ] | |
then | |
echo "Please input directory" | |
exit 0 | |
fi | |
for dir in ${ABS_PATH_ROOT_DIR}/* | |
do | |
echo "Handle Project ${dir}" | |
if [ -d $dir ] | |
then | |
cd $dir | |
npm publish --registry http://localhost:4873 | |
if [ "$?" -eq "0" ] | |
then | |
cd .. | |
else | |
echo "Cannot publish ${dir}" | |
fi | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment