Merge pull request #37 from 0xacx/remove-unnecessary-h-flag-sed

Remove flag to make sed command correct for linux
This commit is contained in:
0xacx 2023-03-12 00:48:09 +02:00 committed by GitHub
commit 01962d9e6b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -32,7 +32,7 @@ curl -sS https://raw.githubusercontent.com/0xacx/chatGPT-shell-cli/main/chatgpt.
# Replace open image command with xdg-open for linux systems
if [[ "$OSTYPE" == "linux-gnu"* ]] || [[ "$OSTYPE" == "freebsd"* ]]; then
sed -i -h '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
chmod +x /usr/local/bin/chatgpt
echo "Installed chatgpt script to /usr/local/bin/chatgpt"