diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..69557e7 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +databases diff --git a/shell.nix b/shell.nix index e2ee9ea..40614cd 100644 --- a/shell.nix +++ b/shell.nix @@ -23,7 +23,10 @@ in mkShell { pg_ctl start -o "--unix_socket_directories=${data_dir} --listen_addresses='''" fi - psql -d postgres -f ${sql_file} + if [ ! -d ${data_dir} ]; then + psql -d postgres -f ${sql_file} + fi + alias psql='psql -d postgres' alias nuke='rm -rf ${data_dir}'