aboutsummaryrefslogtreecommitdiffstats
path: root/library/moment/scripts/npm_prepublish.sh
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2015-11-18 23:50:42 +0100
committerMario Vavti <mario@mariovavti.com>2015-11-18 23:50:42 +0100
commite4145deeb7a72ac321113fde672e1b499ecb0d2d (patch)
treece2fb59fd9d2ec1d13ea0960215967600098ca13 /library/moment/scripts/npm_prepublish.sh
parent68da4d90dcbda1240ae014768a66a164fd5d2b36 (diff)
downloadvolse-hubzilla-e4145deeb7a72ac321113fde672e1b499ecb0d2d.tar.gz
volse-hubzilla-e4145deeb7a72ac321113fde672e1b499ecb0d2d.tar.bz2
volse-hubzilla-e4145deeb7a72ac321113fde672e1b499ecb0d2d.zip
some events refacturing
Diffstat (limited to 'library/moment/scripts/npm_prepublish.sh')
-rwxr-xr-xlibrary/moment/scripts/npm_prepublish.sh43
1 files changed, 43 insertions, 0 deletions
diff --git a/library/moment/scripts/npm_prepublish.sh b/library/moment/scripts/npm_prepublish.sh
new file mode 100755
index 000000000..a4889a55c
--- /dev/null
+++ b/library/moment/scripts/npm_prepublish.sh
@@ -0,0 +1,43 @@
+#!/bin/bash
+
+set -e
+
+if [ "$#" != 1 ]; then
+ echo "Please provide tag to checkout" >&2
+ exit 1
+fi
+tag="$1"
+
+while [ "$PWD" != '/' -a ! -f moment.js ]; do
+ cd ..
+done
+
+if [ ! -f moment.js ]; then
+ echo "Run me from the moment repo" >&2
+ exit 1
+fi
+
+basename=$(basename $PWD)
+src=moment-npm-git
+dest=moment-npm
+
+cd ..
+
+rm -rf $src $dest
+
+git clone $basename $src
+mkdir $dest
+
+
+cp $src/moment.js $dest
+cp $src/package.json $dest
+cp $src/README.md $dest
+cp $src/LICENSE $dest
+cp -r $src/locale $dest
+cp -r $src/min $dest
+cp $src/ender.js $dest
+cp $src/package.js $dest
+
+rm -rf $src
+
+echo "Check out $dest"