Skip to content

Commit

Permalink
chore: add white spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
sebbi08 committed Jul 9, 2024
1 parent 2ee4ae2 commit e209e0f
Showing 1 changed file with 17 additions and 16 deletions.
33 changes: 17 additions & 16 deletions .dev/scripts/linkRuntime.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,29 @@ cd "$CONNECTORPATH"

[ -f .env ] && source "$CONNECTORPATH/.env"
if [ -z "$RUNTIME_PATH" ]; then
echo "\$RUNTIME_PATH not set but required."
exit 1
echo "\$RUNTIME_PATH not set but required."
exit 1
fi

if ! type "entr" >/dev/null; then
echo "'entr' not found. Please install it via your package manager."
exit 1
echo "'entr' not found. Please install it via your package manager."
exit 1
fi

_copyRuntime() {
sleep 2
printf "Copying runtime ..."
find "$RUNTIME_PATH/packages/" -maxdepth 1 -mindepth 1 -type d | while read runtimePkgPath; do
pkgName="$(jq -r .name "$runtimePkgPath/package.json")"
mkdir -p "$CONNECTORPATH/node_modules/$pkgName"
cp -r "$runtimePkgPath/dist" "$runtimePkgPath/src" "$CONNECTORPATH/node_modules/$pkgName"
done
echo "done!"
sleep 2
printf "Copying runtime ..."

find "$RUNTIME_PATH/packages/" -maxdepth 1 -mindepth 1 -type d | while read runtimePkgPath; do
pkgName="$(jq -r .name "$runtimePkgPath/package.json")"
mkdir -p "$CONNECTORPATH/node_modules/$pkgName"
cp -r "$runtimePkgPath/dist" "$runtimePkgPath/src" "$CONNECTORPATH/node_modules/$pkgName"
done
echo "done!"
}

case "$1" in
"") find $RUNTIME_PATH/packages/*/dist | entr -dd -r -s "$0 _copyRuntime" ;;
*) "$@" ;;
esac
"") find $RUNTIME_PATH/packages/*/dist | entr -dd -r -s "$0 _copyRuntime" ;;

*) "$@" ;;
esac

0 comments on commit e209e0f

Please sign in to comment.