Make linux OS detection more generic

This commit is contained in:
keyboardsage 2023-04-23 16:36:26 -04:00
parent 42d82b9d65
commit 3dbe1486bd

View File

@ -40,7 +40,7 @@ fi
curl -sS https://raw.githubusercontent.com/0xacx/chatGPT-shell-cli/main/chatgpt.sh -o /usr/local/bin/chatgpt curl -sS https://raw.githubusercontent.com/0xacx/chatGPT-shell-cli/main/chatgpt.sh -o /usr/local/bin/chatgpt
# Replace open image command with xdg-open for linux systems # Replace open image command with xdg-open for linux systems
if [[ "$OSTYPE" == "linux-gnu"* ]] || [[ "$OSTYPE" == "freebsd"* ]]; then if [[ "$OSTYPE" == "linux"* ]] || [[ "$OSTYPE" == "freebsd"* ]]; then
sed -i 's/open "\${image_url}"/xdg-open "\${image_url}"/g' '/usr/local/bin/chatgpt' sed -i 's/open "\${image_url}"/xdg-open "\${image_url}"/g' '/usr/local/bin/chatgpt'
fi fi
chmod +x /usr/local/bin/chatgpt chmod +x /usr/local/bin/chatgpt