www-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

www/proprietary/workshop item-create


From: Therese Godefroy
Subject: www/proprietary/workshop item-create
Date: Sat, 5 Oct 2019 02:52:32 -0400 (EDT)

CVSROOT:        /webcvs/www
Module name:    www
Changes by:     Therese Godefroy <th_g> 19/10/05 02:52:32

Modified files:
        proprietary/workshop: item-create 

Log message:
        Revert last change.

CVSWeb URLs:
http://web.cvs.savannah.gnu.org/viewcvs/www/proprietary/workshop/item-create?cvsroot=www&r1=1.10&r2=1.11

Patches:
Index: item-create
===================================================================
RCS file: /webcvs/www/www/proprietary/workshop/item-create,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- item-create 3 Oct 2019 09:26:21 -0000       1.10
+++ item-create 5 Oct 2019 06:52:31 -0000       1.11
@@ -26,15 +26,9 @@
 
 export LC_ALL=C
 set -e
-cd /media/Gnu-local/www/proprietary/workshop/
 
-function close_term () {
-  echo -e '\n*** Close the terminal window or press Return.'; read OK
-  test -z "$OK" && exit $1
-}
-
-temp1=$(mktemp -t mal.XXXXXX) || (echo 1>&2 "Can't make temp1";  close_term 1)
-temp2=$(mktemp -t mal.XXXXXX) || (echo 1>&2 "Can't make temp2";  close_term 1)
+temp1=$(mktemp -t mal.XXXXXX) || (echo 1>&2 "Can't make temp1";  exit 1)
+temp2=$(mktemp -t mal.XXXXXX) || (echo 1>&2 "Can't make temp2";  exit 1)
 trap 'rm -f "$temp1" "$temp2"' EXIT
 
 rm -f item.rec item.html mal.rec.temp *.html.temp
@@ -48,45 +42,45 @@
 
 if [ ! -f item ]; then
   echo 1>&2 "!!! 'item' file doesn't exist."
-  close_term 1
+  exit 1
 fi
 if [ ! -r item ]; then
   echo 1>&2 "!!! 'item' file isn't readable."
-  close_term 1
+  exit 1
 fi
 
 files=$(awk '/Target:/ {print $2}' item)
 if [ -z "$files" ]; then
   echo 1>&2 "!!! This item has no Target field.  It can't be added
     anywhere."
-  close_term 1
+  exit 1
 fi
 if ! id=$(grep '^Id:' item); then
   echo 1>&2 "!!! This item doesn't have an Id."
-  close_term 1
+  exit 1
 fi
 if [ `echo "$id" | wc -l` -gt 1 ]; then
   echo 1>&2 "!!! This item has multiple Id lines."
-  close_term 1
+  exit 1
 fi
 if [ "$id" = 'Id: 200000000' ]; then
   echo 1>&2 "!!! This item still has the default Id."
-  close_term 1
+  exit 1
 fi
 if echo "$id" | egrep -qv '^Id: 20[0-9]{7}(\..)?$'; then
   echo 1>&2 "!!! This item has a malformed Id, '$id'."
-  close_term 1
+  exit 1
 fi
 if echo "x$files" | sed '1s,.,,' | grep -q '^proprietary\.html$'; then
   echo 1>&2 "!!! proprietary.html is not a primary target for malware items."
-  close_term 1
+  exit 1
 fi
 if grep -q "$id" mal.rec; then
   echo 1>&2 "!!! An item with same Id is already in mal.rec.
     - If the two items are different, please change the last digit.
     - If you are editing an item that has been added already, you should
     do it in mal.rec, and regenerate the pages with malgen. See README.md."
-  close_term 1
+  exit 1
 fi
 
 wrong_files=$(echo "x$files" | sed '1s,.,,' | while read f; do
@@ -97,7 +91,7 @@
 if [ -n "$wrong_files" ]; then
   echo 1>&2 "!!! These pages don't exist:
 $wrong_files"
-  close_term 1
+  exit 1
 fi
 
 ## Standardize the format.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]