s4

changeset 936:789258aa857a

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 diff
     1.1 --- a/scripts/add-group-csv.sh	Thu Apr 29 15:40:37 2021 +0900
     1.2 +++ b/scripts/add-group-csv.sh	Thu Apr 29 15:43:33 2021 +0900
     1.3 @@ -3,9 +3,11 @@
     1.4  if [ -z "$1" ]; then
     1.5    cat<<-EOF >&2
     1.6  	Usage: $0 CSVfile
     1.7 -	       $0 -a CSVfile		# for al
     1.8 +	       DB=db/world.sq3 $0 CSVfile		# for other world
     1.9  	Csv file should be the form of:
    1.10  	   GroupName,UserName(email)
    1.11 +	or
    1.12 +	   GroupName,UserName(email),admin
    1.13  	EOF
    1.14    exit 1
    1.15  fi
    1.16 @@ -17,6 +19,11 @@
    1.17  
    1.18  target=$(cd `dirname "$1"`; pwd)/`basename $1`
    1.19  
    1.20 +echo target=$target
    1.21 +echo DB=$DB
    1.22 +echo -n 'Proceed? (Ctrl-C to break)'
    1.23 +read x
    1.24 +
    1.25  query<<-EOF
    1.26  	.mode csv
    1.27  	CREATE TEMPORARY TABLE _gusers(gname, user, admin);