summaryrefslogtreecommitdiff
path: root/install-pixelated.sh
diff options
context:
space:
mode:
Diffstat (limited to 'install-pixelated.sh')
-rwxr-xr-xinstall-pixelated.sh12
1 files changed, 10 insertions, 2 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