summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xinstall-pixelated.sh12
-rw-r--r--provisioning/provision.sh2
2 files changed, 11 insertions, 3 deletions
diff --git a/install-pixelated.sh b/install-pixelated.sh
index 62e78703..a3ffb3e2 100755
--- a/install-pixelated.sh
+++ b/install-pixelated.sh
@@ -16,6 +16,13 @@
# along with Pixelated. If not, see <http://www.gnu.org/licenses/>.
# test dependencies
+
+
+if [ ! $USERNAME ]
+then
+ export USERNAME=`whoami`
+fi
+
function check_installed() {
which $1
if [ $? -ne 0 ]; then
@@ -31,9 +38,10 @@ done
# install web-ui dependencies
cd web-ui
+UIPATH=`pwd`
npm install
-node_modules/bower/bin/bower install --config.interactive=false
-bundle install
+su - $USERNAME -c "(cd $UIPATH; node_modules/bower/bin/bower install --config.interactive=false)"
+su - $USERNAME -c "(cd $UIPATH; bundle install)"
LC_ALL=en_US.UTF-8 ./go build
# install service dependencies
diff --git a/provisioning/provision.sh b/provisioning/provision.sh
index 63b1fabf..b269e258 100644
--- a/provisioning/provision.sh
+++ b/provisioning/provision.sh
@@ -10,4 +10,4 @@ sudo /etc/init.d/rng-tools start
cd /vagrant
-./install-pixelated.sh
+USERNAME=vagrant ./install-pixelated.sh