Update PostgreSQL installer commands

Add build command before running cargo Update PostgreSQL installation
commands to use relative paths

Update Linux and macOS installation commands to use `chmod +x ./bin/*`
instead of `chmod +x bin/*`
This commit is contained in:
Rodrigo Rodriguez (Pragmatismo) 2025-10-20 07:50:51 -03:00
parent ed93f70f94
commit 93dab6f741
2 changed files with 3 additions and 5 deletions

View file

@ -1,2 +1,2 @@
clear && \
RUST_LOG=trace cargo run
RUST_LOG=trace,hyper_util=off cargo build && clear && cargo run

View file

@ -138,8 +138,7 @@ impl PackageManager {
binary_name: None,
pre_install_cmds_linux: vec![],
post_install_cmds_linux: vec![
"tar -xzf postgresql-18.0.0-x86_64-unknown-linux-gnu.tar.gz --strip-components=1".to_string(),
"chmod +x bin/*".to_string(),
"chmod +x ./bin/*".to_string(),
"if [ ! -d \"{{DATA_PATH}}/pgdata\" ]; then ./bin/initdb -D {{DATA_PATH}}/pgdata -U postgres; fi".to_string(),
"if [ ! -f \"{{CONF_PATH}}/postgresql.conf\" ]; then echo \"data_directory = '{{DATA_PATH}}/pgdata'\" > {{CONF_PATH}}/postgresql.conf; fi".to_string(),
"if [ ! -f \"{{CONF_PATH}}/postgresql.conf\" ]; then echo \"hba_file = '{{CONF_PATH}}/pg_hba.conf'\" >> {{CONF_PATH}}/postgresql.conf; fi".to_string(),
@ -154,8 +153,7 @@ impl PackageManager {
],
pre_install_cmds_macos: vec![],
post_install_cmds_macos: vec![
"tar -xzf postgresql-18.0.0-x86_64-unknown-linux-gnu.tar.gz --strip-components=1".to_string(),
"chmod +x bin/*".to_string(),
"chmod +x ./bin/*".to_string(),
"if [ ! -d \"{{DATA_PATH}}/pgdata\" ]; then ./bin/initdb -D {{DATA_PATH}}/pgdata -U postgres; fi".to_string(),
],
pre_install_cmds_windows: vec![],