From: Cyrille Pontvieux Date: Tue, 17 Jan 2017 00:27:43 +0000 (+0100) Subject: no bashism in Makefile if possible X-Git-Url: http://git.enialis.net/gitweb/?p=simple-git-host.git;a=commitdiff_plain;h=c11d83b9cff52b0f3ccf89a9ef7639d2bf4a5cdf no bashism in Makefile if possible --- diff --git a/Makefile b/Makefile index d088915..d87278d 100644 --- a/Makefile +++ b/Makefile @@ -95,6 +95,6 @@ _sudo: adminuser: _root @echo "New admin user creation" @echo "" - @sh -c 'echo -n "Username: "; read gituser; echo -n "Password: "; read -s gitpass; gitpass=$$(echo -n "$$gitpass"|md5sum|cut -d" " -f1); sudo -u ${GIT_USER} ${GIT_HOME}/gitrepo.sh create-user $$gituser $$gitpass; sudo -u ${GIT_USER} ${GIT_HOME}/gitrepo.sh user-set-admin $$gituser true' + @sh -c 'printf "Username: "; read gituser; printf "Password: "; stty -echo 2>/dev/null; read -r gitpass; stty echo 2>/dev/null; printf "\n"; gitpass=$$(printf "$$gitpass"|md5sum|cut -d" " -f1); sudo -u ${GIT_USER} ${GIT_HOME}/gitrepo.sh create-user $$gituser $$gitpass; sudo -u ${GIT_USER} ${GIT_HOME}/gitrepo.sh user-set-admin $$gituser true' .PHONY: all _options clean install _root _githome _webhome _sudo adminuser