The source project of this merge request has been removed.
Correct handling of missing .bash_history
1 unresolved thread
1 unresolved thread
Signed-off-by: Martyn Welch martyn.welch@collabora.co.uk
Merge request reports
Activity
Filter activity
60 60 # Touch .bash_history, which we use in some tests, if it's not there. 61 61 bash_history="/home/${CHAIWALA_USER}/.bash_history" 62 62 if [ ! -r ${bash_history} ]; then 63 RET=$( sudo -u ${CHAIWALA_USER} touch ${bash_history} ) 64 if [ $RET != 0 ]; then 63 sudo -u ${CHAIWALA_USER} touch ${bash_history} 64 RET=$? 65 if [ "$RET" != "0" ]; then Or you could just write:
if ! sudo -u ${CHAIWALA_USER} touch ${bash_history} then … fi
Edited by Andrej Shadura
mentioned in commit 4c88dcb2
Please register or sign in to reply