Skip to content

Commit

Permalink
Improve Apple Silicon compatibility (#606)
Browse files Browse the repository at this point in the history
  • Loading branch information
mafredri committed Aug 30, 2021
1 parent 35ae5dd commit c2e0cbe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
}
],
"scripts": {
"postinstall": "PURE_DEST=/usr/local/share/zsh/site-functions npm run --silent postinstall-link && exit 0; PURE_DEST=\"$PWD/functions\" npm run postinstall-link && npm run postinstall-fail-instructions",
"postinstall": "if [[ -e /opt/homebrew/bin/zsh ]]; then PURE_DEST=/opt/homebrew/share/zsh/site-functions npm run --silent postinstall-link && exit 0; elif [[ -e /usr/local/bin/zsh ]]; then PURE_DEST=/usr/local/share/zsh/site-functions npm run --silent postinstall-link && exit 0; elif [[ -e /bin/zsh ]] || [[ -e /usr/bin/zsh ]]; then PURE_DEST=/usr/share/zsh/site-functions npm run --silent postinstall-link && exit 0; fi; PURE_DEST=\"$PWD/functions\" npm run --silent postinstall-link && npm run --silent postinstall-fail-instructions",
"postinstall-link": "mkdir -p \"$PURE_DEST\" && ln -sf \"$PWD/pure.zsh\" \"$PURE_DEST/prompt_pure_setup\" && ln -sf \"$PWD/async.zsh\" \"$PURE_DEST/async\"",
"postinstall-fail-instructions": "echo \"ERROR: Could not automagically symlink the prompt. Either:\\n1. Check out the readme on how to do it manually: https://github.com/sindresorhus/pure#manually\\n2. Or add the following to your \\`.zshrc\\`:\\n\\n fpath+=('$PWD/functions')\"",
"postinstall-fail-instructions": "echo \"\\nERROR: Could not automagically symlink the prompt. You can either:\\n\\n1. Add the following to your \\`.zshrc\\`:\\n\\n fpath+=('$PWD/functions')\\n\\n2. Or check out the readme on how to do it manually: https://github.com/sindresorhus/pure#manually\"",
"version": "sed -i '' -e 's/prompt_pure_state\\[version\\]=.*/prompt_pure_state[version]=\"'\"$npm_package_version\"'\"/' pure.zsh && git add pure.zsh"
},
"files": [
Expand Down

0 comments on commit c2e0cbe

Please sign in to comment.