#!/usr/bin/env bash set -e function setup-git-credential-libsecret() { echo "Installing dependencies..." sudo apt install -qq --yes build-essential libsecret-1-dev libglib2.0-dev echo "Running build..." cd "/usr/share/doc/git/contrib/credential/libsecret" sudo make local -r helper="/usr/share/doc/git/contrib/credential/libsecret/git-credential-libsecret" echo "" echo "To use git-credential-libsecret helper, run:" echo "" echo " git config --global credential.helper \"${helper}\"" echo "" echo "Done!" } setup-git-credential-libsecret