forked from alisw/alidist
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ecsg.sh
40 lines (37 loc) · 1.16 KB
/
ecsg.sh
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
28
29
30
31
32
33
34
35
36
37
38
39
40
package: ecsg
version: "v1.0.0"
tag: qcg-v1.4.4
requires:
- node
build_requires:
- node
source: https://github.com/AliceO2Group/WebUi.git
---
#!/bin/bash
rsync -a --delete $SOURCEDIR/Control/* $BUILDDIR/
pushd $BUILDDIR
npm install --only=production --loglevel error --no-save --no-package-lock
mkdir -p bin
echo "[ -z \"\$1\" ] && CONFIG=\"$INSTALLROOT/config.js\" || CONFIG=\"\$1\"; node \"$INSTALLROOT/index.js\" \$CONFIG" > bin/ecsg
chmod +x bin/ecsg
popd
rsync -a --delete $BUILDDIR/ $INSTALLROOT/
rsync -a --ignore-existing $BUILDDIR/config-default.js $INSTALLROOT/config.js
# Modulefile
MODULEDIR="$INSTALLROOT/etc/modulefiles"
MODULEFILE="$MODULEDIR/$PKGNAME"
mkdir -p "$MODULEDIR"
cat > "$MODULEFILE" <<EoF
#%Module1.0
proc ModulesHelp { } {
global version
puts stderr "ALICE Modulefile for $PKGNAME $PKGVERSION-@@PKGREVISION@$PKGHASH@@"
}
set version $PKGVERSION-@@PKGREVISION@$PKGHASH@@
module-whatis "ALICE Modulefile for $PKGNAME $PKGVERSION-@@PKGREVISION@$PKGHASH@@"
# Dependencies
module load BASE/1.0 ${NODE_REVISION:+node/$NODE_VERSION-$NODE_REVISION}
# Our environment
set BASEDIR \$::env(BASEDIR)
prepend-path PATH \$BASEDIR/$PKGNAME/\$version/bin
EoF