Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

PG init scripts now do spaces in usernames. Closes #13.

  • Loading branch information...
commit ba6e9c159e89ecb3a189b1bb70b8407bf54864cb 1 parent cc51073
@sfsmith authored
View
8 installer/windows/scripts/pg_install_data.cmd
@@ -14,14 +14,14 @@ set PGPORT=%pg_port%
set pgdatalist=%TEMP%\pg_data.txt
:: Create the Medford Database
-call "%pg_bin_dir%\createdb" --owner=%USERNAME% --template=template_postgis medford
+call "%pg_bin_dir%\createdb" --owner="%USERNAME%" --template=template_postgis medford
if not errorlevel 0 (
echo There was an error while creating the Medford database.
goto Fail
)
:: Create the GeoServer/Analytics Database
-call "%pg_bin_dir%\createdb" --owner=%USERNAME% --template=template_postgis geoserver
+call "%pg_bin_dir%\createdb" --owner="%USERNAME%" --template=template_postgis geoserver
if not errorlevel 0 (
echo There was an error while creating the GeoServer database.
goto Fail
@@ -33,7 +33,7 @@ dir /b "%pg_data_load_dir%" > "%pgdatalist%"
:: Schema files first
for /f "tokens=* delims= " %%a in ('findstr _schema "%pgdatalist%"') do (
echo Loading file: %%a
- "%pg_bin_dir%\psql" -f "%pg_data_load_dir%\%%a" -d medford -U %USERNAME% >> "%pg_log%" >nul
+ "%pg_bin_dir%\psql" -f "%pg_data_load_dir%\%%a" -d medford -U "%USERNAME%" >> "%pg_log%" >nul
)
if not errorlevel 0 (
echo There was an error while loading Medford data tables.
@@ -42,7 +42,7 @@ if not errorlevel 0 (
:: Non-schema files next
for /f "tokens=* delims= " %%a in ('findstr /vi _schema "%pgdatalist%"') do (
echo Loading file: %%a
- "%pg_bin_dir%\psql" -f "%pg_data_load_dir%\%%a" -d medford -U %USERNAME% >> "%pg_log%" >nul
+ "%pg_bin_dir%\psql" -f "%pg_data_load_dir%\%%a" -d medford -U "%USERNAME%" >> "%pg_log%" >nul
)
if not errorlevel 0 (
echo There was an error while loading Medford data tables.
View
4 installer/windows/scripts/pg_install_user.cmd
@@ -23,7 +23,7 @@ if not errorlevel 0 (
:: Create user database
-"%pg_bin_dir%\createuser" --createdb --superuser %USERNAME% >> "%pg_log%" >nul
+"%pg_bin_dir%\createuser" --createdb --superuser "%USERNAME%" >> "%pg_log%" >nul
:: Any errors?
if not errorlevel 0 (
@@ -31,7 +31,7 @@ if not errorlevel 0 (
goto End
)
-"%pg_bin_dir%\createdb" --owner=%USERNAME% --template=template_postgis %USERNAME% >> "%pg_log%" >nul
+"%pg_bin_dir%\createdb" --owner="%USERNAME%" --template=template_postgis "%USERNAME%" >> "%pg_log%" >nul
:: Any errors?
if not errorlevel 0 (
echo There was an error while attempting to create user.
Please sign in to comment.
Something went wrong with that request. Please try again.