diff --git a/scripts/npm-clean.sh b/scripts/npm-clean.sh index d689082012..463757af0f 100755 --- a/scripts/npm-clean.sh +++ b/scripts/npm-clean.sh @@ -1,5 +1,7 @@ #!/usr/bin/env bash +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + for PACKAGE in \ ng2-alfresco-core \ ng2-alfresco-datatable \ @@ -10,10 +12,9 @@ for PACKAGE in \ ng2-alfresco-viewer do echo "====== clean component: ${PACKAGE} =====" - cd ../ng2-components/${PACKAGE} + cd "$DIR/../ng2-components/${PACKAGE}" npm run clean - cd ../../scripts/ done -cd ./../demo-shell-ng2 -npm run clean \ No newline at end of file +cd "$DIR/../demo-shell-ng2" +npm run clean diff --git a/scripts/npm-link-demo-shell.sh b/scripts/npm-link-demo-shell.sh index df256f48b4..af832a4591 100755 --- a/scripts/npm-link-demo-shell.sh +++ b/scripts/npm-link-demo-shell.sh @@ -1,5 +1,7 @@ #!/usr/bin/env bash +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + for PACKAGE in \ ng2-alfresco-core \ ng2-alfresco-datatable \ @@ -9,12 +11,12 @@ for PACKAGE in \ ng2-alfresco-upload \ ng2-alfresco-viewer do - DESTDIR=././../ng2-components/${PACKAGE} + DESTDIR="$DIR/../ng2-components/${PACKAGE}" echo "====== linking component: ${DESTDIR} =====" npm link ${DESTDIR} --access public done -cd ./../demo-shell-ng2 +cd "$DIR/../demo-shell-ng2" for PACKAGE in \ ng2-alfresco-core \ @@ -25,7 +27,7 @@ for PACKAGE in \ ng2-alfresco-upload \ ng2-alfresco-viewer do - DESTDIR=././../ng2-components/${PACKAGE} + DESTDIR="$DIR/../ng2-components/${PACKAGE}" echo "====== demo shell linking: ${PACKAGE} =====" npm link ${PACKAGE} -done \ No newline at end of file +done diff --git a/scripts/npm-publish.sh b/scripts/npm-publish.sh index 092da9dba5..5593809e17 100755 --- a/scripts/npm-publish.sh +++ b/scripts/npm-publish.sh @@ -1,5 +1,7 @@ #!/usr/bin/env bash +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + for PACKAGE in \ ng2-alfresco-core \ ng2-alfresco-datatable \ @@ -9,7 +11,7 @@ for PACKAGE in \ ng2-alfresco-upload \ ng2-alfresco-viewer do - DESTDIR=././../ng2-components/${PACKAGE} + DESTDIR="$DIR/../ng2-components/${PACKAGE}" echo "====== PUBLISHING: ${DESTDIR} =====" npm publish ${DESTDIR} -done \ No newline at end of file +done diff --git a/scripts/start.sh b/scripts/start.sh index 2e199dc829..8984114d26 100755 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -1,5 +1,7 @@ #!/usr/bin/env bash +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + for PACKAGE in \ ng2-alfresco-core \ ng2-alfresco-datatable \ @@ -9,16 +11,15 @@ for PACKAGE in \ ng2-alfresco-upload \ ng2-alfresco-viewer do - cd ../ng2-components/${PACKAGE}; npm version patch ; cd ../../scripts/ + cd "$DIR/../ng2-components/${PACKAGE}"; npm version patch done -./update-version.sh ^0.1.0 +"$DIR/update-version.sh" ^0.1.0 -./npm-link-demo-shell.sh +"$DIR/npm-link-demo-shell.sh" -cd ../demo-shell-ng2 +cd "$DIR/../demo-shell-ng2" -#!/bin/sh if [[ $1 = "-install" ]]; then npm install npm run start @@ -31,4 +32,4 @@ elif [[ $1 = "-cleanInstall" ]]; then npm run start else npm run start -fi \ No newline at end of file +fi