From 66fcf702d48300a312d35cc61c26141c5563bf10 Mon Sep 17 00:00:00 2001 From: Paul Trowbridge Date: Wed, 27 Apr 2022 20:28:56 -0400 Subject: [PATCH] install and setup pspg and make psql default pager --- .bashrc | 1 + setup.sh | 20 +++++++++++++++----- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/.bashrc b/.bashrc index 95efd7d..a9a41cd 100644 --- a/.bashrc +++ b/.bashrc @@ -121,6 +121,7 @@ PAGER="less" LESS="-S" export PG="psql -U ptrowbridge -d ubm -p 54329 -h hptrow.me" export PGD="psql -U ptrowbridge -d ubm -p 54339 -h hptrow.me" +export PSQL_PAGER="pspg" # GOPATH=$HOME/go # function _update_ps1() { diff --git a/setup.sh b/setup.sh index 6b95597..8d61664 100755 --- a/setup.sh +++ b/setup.sh @@ -5,7 +5,7 @@ dir=~/dot_config backup=~/dot_config_backup -files=".bashrc .vimrc .tmux.conf .psqlrc .gitconfig .inputrc" +files=".bashrc .vimrc .tmux.conf .psqlrc .gitconfig .inputrc .pspgconf" #-------------------------------------------------install debian tooling----------------------------------------------------------------------------------- @@ -14,17 +14,17 @@ if [ "$(dpkg-query -W -f='${Status}' "curl" 2>/dev/null | grep -c "ok installed" then echo "curl already installed" else - echo "installing curl" + echo "installing curl..." apt update -q4 apt install curl -y fi #----------vim----------- -if [ "$(dpkg-query -W -f='${Status}' "curl" 2>/dev/null | grep -c "ok installed")" == "1" ] +if [ "$(dpkg-query -W -f='${Status}' "vim" 2>/dev/null | grep -c "ok installed")" == "1" ] then echo "vim already installed" else - echo "installing vim" + echo "installing vim..." apt update -q4 apt install vim -y fi @@ -34,11 +34,21 @@ if [ "$(dpkg-query -W -f='${Status}' "tmux" 2>/dev/null | grep -c "ok installed" then echo "tmux already installed" else - echo "installing tmux" + echo "installing tmux..." apt update -q4 apt install tmux -y fi +#----------pspg----------- +if [ "$(dpkg-query -W -f='${Status}' "pspg" 2>/dev/null | grep -c "ok installed")" == "1" ] +then + echo "pspg already installed" +else + echo "installing pspg..." + apt update -q4 + apt install pspg -y +fi + #------------------------------------------------ create the resore directory if it doesn't already exist-------------------------------------------------- if [ ! -d $backup ]