From 1de46b96fea2d25017e73b95f459f01975f05372 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki-Chudyk?= Date: Fri, 1 Jul 2016 13:29:03 +0200 Subject: [PATCH] guess the user name if not present in cyryl --- common/configure_fresh_system | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/common/configure_fresh_system b/common/configure_fresh_system index 806deff3..9b7f0007 100755 --- a/common/configure_fresh_system +++ b/common/configure_fresh_system @@ -1,6 +1,7 @@ #!/bin/bash set -e +set -v echo echo "configuring settings common among OSes" sudo true @@ -119,6 +120,10 @@ sudo npm install -g diff-so-fancy echo "installing vdirsyncer" sudo pip install vdirsyncer +if [[ -z $USER ]]; then + USER=`whoami` +fi + # normalize npm permissions mkdir -p $HOME/.npm sudo chown $USER $HOME/.npm -R