Use sed rather than perl for reindexdb.

This commit is contained in:
Bruce Momjian 2002-11-03 01:20:06 +00:00
parent 77fcc1cbae
commit 08e8c8a574
1 changed files with 16 additions and 7 deletions

View File

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- # # -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- #
# Package : reindexdb Version : $Revision: 1.2 $ # Package : reindexdb Version : $Revision: 1.3 $
# Date : 05/08/2002 Author : Shaun Thomas # Date : 05/08/2002 Author : Shaun Thomas
# Req : psql, sh, perl, sed Type : Utility # Req : psql, sh, perl, sed Type : Utility
# #
@ -111,8 +111,11 @@ do
dbname="$2" dbname="$2"
shift shift
;; ;;
-d*|--dbname=*) -d*)
dbname=`echo $1 | perl -pn -e 's/^--?d(bname=)?//'` dbname=`echo "$1" | sed 's/^-d/'`
;;
--dbname=*)
dbname=`echo "$1" | sed 's/^--dbname=//'`
;; ;;
# Reindex specific Table. Disables index reindexing. # Reindex specific Table. Disables index reindexing.
@ -120,8 +123,11 @@ do
table="$2" table="$2"
shift shift
;; ;;
-t*|--table=*) -t*)
table=`echo $1 | perl -pn -e 's/^--?t(able=)?//'` table=`echo "$1" | sed 's/^-t//'`
;;
--table=*)
table=`echo "$1" | sed 's/^--table=//'`
;; ;;
# Reindex specific index. Disables table reindexing. # Reindex specific index. Disables table reindexing.
@ -129,8 +135,11 @@ do
index="$2" index="$2"
shift shift
;; ;;
-i*|--index=*) -i*)
index=`echo $1 | perl -pn -e 's/^--?i(ndex=)?//'` index=`echo "$1" | sed 's/^-i//'`
;;
--index=*)
index=`echo "$1" | sed 's/^--index=//'`
;; ;;
# Yeah, no options? Whine, and show usage. # Yeah, no options? Whine, and show usage.