diff options
author | Bruno Wagner <bwgpro@gmail.com> | 2014-12-03 17:04:06 -0200 |
---|---|---|
committer | Bruno Wagner <bwgpro@gmail.com> | 2014-12-03 17:06:48 -0200 |
commit | bc51867f1cfc13185681b01e2dd8f48f0f7fdeb9 (patch) | |
tree | 2d0b8e69433c546bd35972a222eb30b6c02fa0cb /install-pixelated.sh | |
parent | 914cde61183bc6db7fa4c5b3430e38e7b51187e2 (diff) |
Updated vagrant box because bower and bundle doesn't like to be run as root
Diffstat (limited to 'install-pixelated.sh')
-rwxr-xr-x | install-pixelated.sh | 12 |
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 |