Skip to content

Commit

Permalink
don't limit the script to Debian-based distros
Browse files Browse the repository at this point in the history
remove automatic install apt
  • Loading branch information
jmau111 authored Feb 13, 2023
1 parent 95e72c1 commit 0fc1a44
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions gitconfig.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,14 @@ OPTIONS:
EOF
}

function err() {
echo -e "\e[1;31m$1\033[0m" >&2
echo
}

maybe_install_git() {
if ! [ -x "$(command -v git)" ]; then
sudo apt install -y git
err "I need Git. Please install it on your system. For example 'sudo apt install -y git' on Debian"
fi
}

Expand All @@ -44,11 +49,6 @@ function configure_git() {
git config --global alias.grep '!git ls-files | grep -i'
}

function err() {
echo -e "\e[1;31m$1\033[0m" >&2
echo
}

main() {

local BACKUP_FOLDER="$HOME/gitconfig-backups"
Expand Down

0 comments on commit 0fc1a44

Please sign in to comment.