From e3f735cc1a3a5c4d22aea831c7ff602a52c286ec Mon Sep 17 00:00:00 2001 From: bbracker Date: Sun, 6 Mar 2022 13:30:19 -0800 Subject: [PATCH] recommend sudo commands without automatically executing them in genInitMem.sh --- linux/testvector-generation/genInitMem.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/linux/testvector-generation/genInitMem.sh b/linux/testvector-generation/genInitMem.sh index 3e0aef83..d1e28fa3 100755 --- a/linux/testvector-generation/genInitMem.sh +++ b/linux/testvector-generation/genInitMem.sh @@ -22,13 +22,15 @@ if [[ $REPLY =~ ^[Yy]$ ]] then if [ ! -d "$tvDir" ]; then echo "Error: linux testvector directory $tvDir not found!">&2 - echo "Please create it.">&2 + echo "Please create it. For example:">&2 + echo " sudo mkdir -p $tvDir">&2 exit 1 fi test -w $RISCV/linux-testvectors if [ ! $? -eq 0 ]; then echo "Error: insuffcient write privileges for linux testvector directory $tvDir !">&2 - echo "Please chmod it.">&2 + echo "Please chmod it. For example:">&2 + echo " sudo chmod a+rw $tvDir">&2 exit 1 fi @@ -62,5 +64,8 @@ then ./fixBinMem "$rawUntrimmedBootmemFile" "$untrimmedBootmemFile" echo "genInitMem.sh completed!" - echo "You may consider restricting write access to $tvDir now." + echo "You may want to restrict write access to $tvDir now and give cad ownership of it." + echo "Run the following:" + echo " sudo chown -R cad:cad $tvDir" + echo " sudo chmod -R go-w $tvDir" fi