Skip to content

Commit e7feb1b

Browse files
authored
tweek for ubuntu
1 parent 1eed9ad commit e7feb1b

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

install_postgres_json_schema_extension.sh

+14-4
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,18 @@ cd postgres-json-schema
4040
# Build the extension
4141
make && make install
4242

43-
# Create the extension directory if it doesn't exist
44-
mkdir -p '/usr/local/share/postgresql/extension'
4543

46-
# Set appropriate permissions for the control file
47-
chmod 644 /usr/local/share/postgresql/extension/postgres-json-schema.control
44+
if [[ "$OS" == *"Alpine"* ]]; then
45+
# Create the extension directory if it doesn't exist
46+
mkdir -p '/usr/local/share/postgresql/extension'
47+
# Set appropriate permissions for the control file
48+
chmod 644 /usr/local/share/postgresql/extension/postgres-json-schema.control
49+
elif [[ "$OS" == *"Ubuntu"* ]]; then
50+
# Create the extension directory if it doesn't exist
51+
mkdir -p '/usr/share/postgresql/extension'
52+
# Set appropriate permissions for the control file
53+
chmod 644 /usr/share/postgresql/extension/postgres-json-schema.control
54+
else
55+
echo "Unsupported operating system: $OS"
56+
exit 1
57+
fi

0 commit comments

Comments
 (0)