Skip to content

Commit c2f6219

Browse files
committed
Try to support Solaris.
1 parent 12554f7 commit c2f6219

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

contrib/pg_arman/sql/common.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,5 +92,11 @@ EOF
9292

9393
function get_time_last_backup()
9494
{
95-
pg_arman -B ${BACKUP_PATH} show | tail -n +4 | head -n 1 | awk '{print($1, $2)}'
95+
set name_os = `uname`
96+
if [ "$name_os" -n "SunOS" ]
97+
then
98+
pg_arman -B ${BACKUP_PATH} show | gtail -n +4 | head -n 1 | awk '{print($1, $2)}'
99+
else
100+
pg_arman -B ${BACKUP_PATH} show | tail -n +4 | head -n 1 | awk '{print($1, $2)}'
101+
fi
96102
}

0 commit comments

Comments
 (0)