wip3
This commit is contained in:
+36
-8
@@ -1,13 +1,41 @@
|
||||
#!/usr/bin/env bash
|
||||
##makedesc: Install software from brew
|
||||
|
||||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||
set -eo pipefail
|
||||
|
||||
brew install \
|
||||
bash \
|
||||
stow \
|
||||
gnupg \
|
||||
pinentry-mac
|
||||
if [ "$(uname -s)" != "Darwin" ]; then
|
||||
echo "ERROR: This script is for MacOS only." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "pinentry-program $(which pinentry-mac)" >> ~/.gnupg/gpg-agent.conf
|
||||
gpgconf --kill gpg-agent
|
||||
installed() { command -v "$1" >/dev/null 2>&1; }
|
||||
|
||||
install() {
|
||||
echo
|
||||
echo "==============================================="
|
||||
echo "Installing software from brew"
|
||||
echo "==============================================="
|
||||
echo
|
||||
|
||||
if ! installed brew; then
|
||||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||
fi
|
||||
|
||||
brew install \
|
||||
bash \
|
||||
stow \
|
||||
gnupg \
|
||||
pinentry-mac
|
||||
|
||||
mkdir -p ~/.gnupg
|
||||
echo "pinentry-program $(which pinentry-mac)" >> ~/.gnupg/gpg-agent.conf
|
||||
gpgconf --kill gpg-agent
|
||||
|
||||
echo
|
||||
echo "Finish!"
|
||||
echo
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
*) install ;;
|
||||
esac
|
||||
|
||||
Reference in New Issue
Block a user