Skip to content

Commit

Permalink
Improve dump_seeds script to print absolute path of the dump
Browse files Browse the repository at this point in the history
  • Loading branch information
jirutka authored and jnv committed Apr 12, 2017
1 parent 31e6cb5 commit af189bc
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions script/dump_seeds
Expand Up @@ -8,8 +8,9 @@ if [ $# -eq 0 ]; then
exit 1
fi

current_dir=$(dirname "$0")
outfile="$current_dir/../db/seeds.sql"
cd "$(dirname "$0")/.."

outfile='db/seeds.sql'
dump_params='-a -O -x --inserts -t faculty_semesters -t semester_periods -t schedule_exceptions'

# shellcheck disable=SC2086
Expand All @@ -19,4 +20,4 @@ pg_dump "$@" $dump_params > "$outfile.tmp"
sed '/^[sS][eE][tT] search_path\s*=/d' "$outfile.tmp" > "$outfile"
rm "$outfile.tmp"

echo "Seeds dumped to $outfile"
echo "Seeds dumped to $(pwd)/$outfile"

0 comments on commit af189bc

Please sign in to comment.