mirror of
https://github.com/YunoHost/vinaigrette.git
synced 2024-09-03 20:06:11 +02:00
21 lines
608 B
Bash
Executable file
21 lines
608 B
Bash
Executable file
#!/bin/sh
|
|
|
|
#
|
|
# Dirty hook to npm install, because I have no idea how this
|
|
# is supposed to be done properly
|
|
# (no network during the actual build)
|
|
#
|
|
|
|
PACKAGEJSON=$(find /build/ -name "package.json")
|
|
if [ ! -z "$PACKAGEJSON" ]
|
|
then
|
|
echo "======================================================"
|
|
/usr/bin/apt-get install git nodejs -y
|
|
mkdir /nonexistent
|
|
chown pbuilder:pbuilder /nonexistent
|
|
echo "========================"
|
|
echo "Starting npm install ..."
|
|
echo "========================"
|
|
cd $(dirname $PACKAGEJSON) && su pbuilder -c "npm install"
|
|
echo "======================================================"
|
|
fi
|