u
This commit is contained in:
@@ -20,6 +20,12 @@ cd /tmp
|
||||
# src: https://gist.github.com/steinwaywhw/a4cd19cda655b8249d908261a62687f8?permalink_comment_id=5097031#gistcomment-5097031
|
||||
latest_version=$(curl -s https://api.github.com/repos/PostgREST/postgrest/releases/latest | grep -oP '"tag_name": "\K(.*)(?=")')
|
||||
|
||||
# ask for user input
|
||||
echo 'install postgrest {$latest_version}? [y/n]'
|
||||
read -n1 user_input
|
||||
|
||||
if [[ ${user_input} == "y" ]]; then
|
||||
|
||||
# construct download url
|
||||
download_url="https://github.com/PostgREST/postgrest/releases/download/${latest_version}/postgrest-${latest_version}-linux-static-x86-64.tar.xz"
|
||||
|
||||
@@ -32,8 +38,9 @@ tar -xJf *.xz
|
||||
# move executable to correct directory
|
||||
mv postgrest /usr/local/bin
|
||||
|
||||
fi
|
||||
|
||||
|
||||
# create /etc/postgrest
|
||||
if ! [ -d "/etc/postgrest" ]
|
||||
then
|
||||
|
||||
@@ -42,6 +49,7 @@ then
|
||||
|
||||
fi
|
||||
|
||||
# add config
|
||||
if ! [ -f "/etc/postgrest/config" ]
|
||||
then
|
||||
|
||||
@@ -49,8 +57,8 @@ then
|
||||
|
||||
cp config /etc/postgrest/
|
||||
|
||||
echo "*************************************************************"
|
||||
echo "* please add proper login data to '/etc/postgrest/config' ! *"
|
||||
echo "*************************************************************"
|
||||
echo "*********************************************************************"
|
||||
echo "* please, populate '/etc/postgrest/config' with proper login data ! *"
|
||||
echo "*********************************************************************"
|
||||
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user