summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/UniversalLanguageSelector/scripts/update-jquery-ime.sh
blob: fec9c602f77d58ab14f5cac2e1367ca250c4fcb6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash

BASEDIR=$(dirname "$0")
BASEDIR="$BASEDIR/.."

DEST="$BASEDIR/lib/jquery.ime"
CLONEDIR="$BASEDIR/vendor/jquery.ime"

UPSTREAM="https://github.com/wikimedia/jquery.ime.git"

echo "Getting latest jquery.ime from $UPSTREAM"

if [ -d "$CLONEDIR" ]; then
	pushd "$CLONEDIR"
	git pull
	popd
else
	git clone "$UPSTREAM" "$CLONEDIR"
fi

pushd "$CLONEDIR"
npm install
./node_modules/.bin/grunt copy concat
popd

rm -rf "$DEST"/*
cp -R "$CLONEDIR"/dist/jquery.ime/{images,css,rules,jquery.ime.js} "$CLONEDIR"/*LICENSE "$DEST"