|
@@ -1,20 +0,0 @@
|
1
|
|
-#!/bin/bash
|
2
|
|
-user="root"
|
3
|
|
-command="npm install \
|
4
|
|
-&& gulp prod"
|
5
|
|
-echo "############################################################################"
|
6
|
|
-echo "############################################################################"
|
7
|
|
-echo "## "
|
8
|
|
-echo "## UPDATE ----------"
|
9
|
|
-echo "## "
|
10
|
|
-echo "##" `date` Execute as $user: $command
|
11
|
|
-echo "## "
|
12
|
|
-echo "## "
|
13
|
|
-echo "############################################################################"
|
14
|
|
-if ! command -v npm >/dev/null; then
|
15
|
|
- echo ""
|
16
|
|
- echo "/!\ npm doesn't seem to be installed. Aborting."
|
17
|
|
- echo ""
|
18
|
|
- exit 1
|
19
|
|
-fi
|
20
|
|
-sudo -u $user -- bash -c "$command"
|