changeset 936:789258aa857a draft

Fix for adding to other world
author HIROSE Yuuji <yuuji@gentei.org>
date Thu, 29 Apr 2021 15:43:33 +0900
parents c17e67348950
children 7b3786b1eb4b
files scripts/add-group-csv.sh
diffstat 1 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/add-group-csv.sh	Thu Apr 29 15:40:37 2021 +0900
+++ b/scripts/add-group-csv.sh	Thu Apr 29 15:43:33 2021 +0900
@@ -3,9 +3,11 @@
 if [ -z "$1" ]; then
   cat<<-EOF >&2
 	Usage: $0 CSVfile
-	       $0 -a CSVfile		# for al
+	       DB=db/world.sq3 $0 CSVfile		# for other world
 	Csv file should be the form of:
 	   GroupName,UserName(email)
+	or
+	   GroupName,UserName(email),admin
 	EOF
   exit 1
 fi
@@ -17,6 +19,11 @@
 
 target=$(cd `dirname "$1"`; pwd)/`basename $1`
 
+echo target=$target
+echo DB=$DB
+echo -n 'Proceed? (Ctrl-C to break)'
+read x
+
 query<<-EOF
 	.mode csv
 	CREATE TEMPORARY TABLE _gusers(gname, user, admin);

yatex.org