mirror of
https://github.com/percona/percona-toolkit.git
synced 2026-04-06 01:06:43 +08:00
Die if --log, --pid, or --dest aren't accessible. Also die if po dir isn't accessible.
This commit is contained in:
@@ -111,8 +111,20 @@ parse_options() {
|
||||
# default=foo
|
||||
# That's the spec for --string-opt2. Each line is a key:value pair
|
||||
# from the option's POD line like "type: string; default: foo".
|
||||
mkdir "$TMPDIR/po/" 2>/dev/null
|
||||
if [ ! -d "$TMPDIR/po/" ]; then
|
||||
mkdir "$TMPDIR/po/"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Cannot mkdir $TMPDIR/po/" >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
rm -rf "$TMPDIR"/po/*
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Cannot rm -rf $TMPDIR/po/*" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
(
|
||||
export PO_DIR="$TMPDIR/po"
|
||||
cat "$file" | perl -ne '
|
||||
|
||||
Reference in New Issue
Block a user