scripts/saveSample.sh.in
changeset 2941 13e40098fffc
parent 2838 822af73497bf
child 2981 80151a249b85
     1.1 --- a/scripts/saveSample.sh.in	Mon Jan 16 23:36:42 2012 +0100
     1.2 +++ b/scripts/saveSample.sh.in	Mon Apr 16 15:25:36 2012 +0200
     1.3 @@ -121,14 +121,18 @@
     1.4  [ -f "${samp_dir}/reported.by" ] && . "${samp_dir}/reported.by"
     1.5  old_name="${reporter_name}"
     1.6  old_url="${reporter_url}"
     1.7 +old_comment="${reporter_comment}"
     1.8  read -p "Reporter name [${reporter_name}]: " reporter_name
     1.9  read -p "Reporter URL [${reporter_url}]: " reporter_url
    1.10  if [ -n "${reporter_comment}" ]; then
    1.11 -  echo "Old comment if you need to copy-paste:"
    1.12 -  printf "${reporter_comment}\n"
    1.13 +  echo "Old comment:"
    1.14 +  printf "${reporter_comment}\n" |sed -r -e 's/^/  > /;'
    1.15  fi
    1.16 -echo "Reporter comment (Ctrl-D to finish):"
    1.17 +echo "Reporter comment (Ctrl-D to finish, '.' to use previous):"
    1.18  reporter_comment=$(cat)
    1.19 +if [ "${reporter_comment}" = "." ]; then
    1.20 +  reporter_comment="${old_comment}"
    1.21 +fi
    1.22  
    1.23  ( echo "reporter_name=\"${reporter_name:=${old_name}}\""
    1.24    echo "reporter_url=\"${reporter_url:=${old_url}}\""