Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8445ccd

Browse files
committed
From: Igor <igor@sba.miami.edu>
Subject: [PATCHES] Another destroydb patchThis is a patch to my previous destroydb patch cause some people wantedslightly different behavior. After this patch is applied, destroydbwill destroy a database as usual, but if added -i flag (which could bealiased like rm -i) would ask for confirmation.
1 parentf9f98e3 commit8445ccd

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

‎src/bin/destroydb/destroydb.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#
1212
#
1313
# IDENTIFICATION
14-
# $Header: /cvsroot/pgsql/src/bin/destroydb/Attic/destroydb.sh,v 1.7 1997/06/01 15:40:08 scrappy Exp $
14+
# $Header: /cvsroot/pgsql/src/bin/destroydb/Attic/destroydb.sh,v 1.8 1997/06/02 02:53:00 scrappy Exp $
1515
#
1616
#-------------------------------------------------------------------------
1717

@@ -30,11 +30,11 @@ if [ -z "$USER" ]; then
3030
fi
3131

3232
dbname=$USER
33-
forcedel=f
33+
forcedel=t
3434
while [-n"$1" ]
3535
do
3636
case$1in
37-
-y) forcedel=t;;
37+
-i) forcedel=f;;
3838
-a) AUTHSYS=$2;shift;;
3939
-h) PGHOST=$2;shift;;
4040
-p) PGPORT=$2;shift;;
@@ -67,6 +67,7 @@ if [ "$forcedel" = f ]
6767

6868
while ["$answer"!= y-a"$answer"!= n ]
6969
do
70+
echo"Database '$dbname' will be permanently deleted."
7071
echo -n"Are you sure? (y/n)"
7172
read answer
7273
done

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp