guess the user name if not present in cyryl

This commit is contained in:
Cyryl Płotnicki-Chudyk 2016-07-01 13:29:03 +02:00
parent 711ebfcc80
commit 1de46b96fe

View file

@ -1,6 +1,7 @@
#!/bin/bash #!/bin/bash
set -e set -e
set -v
echo echo
echo "configuring settings common among OSes" echo "configuring settings common among OSes"
sudo true sudo true
@ -119,6 +120,10 @@ sudo npm install -g diff-so-fancy
echo "installing vdirsyncer" echo "installing vdirsyncer"
sudo pip install vdirsyncer sudo pip install vdirsyncer
if [[ -z $USER ]]; then
USER=`whoami`
fi
# normalize npm permissions # normalize npm permissions
mkdir -p $HOME/.npm mkdir -p $HOME/.npm
sudo chown $USER $HOME/.npm -R sudo chown $USER $HOME/.npm -R