Ensure we have sort -v
This commit is contained in:
parent
d5f8224786
commit
2fb13d0fd1
@ -55,12 +55,15 @@ ln -sf $EWCONFIG_ROOT/configs/git/.mailmap ~/.config/git/.mailmap
|
|||||||
# Check if GIT is installed > 2.34
|
# Check if GIT is installed > 2.34
|
||||||
set +x
|
set +x
|
||||||
if type -p git > /dev/null; then
|
if type -p git > /dev/null; then
|
||||||
# If GIT has SSH signing support, enable it
|
# If sort has a -V option
|
||||||
git_version=$(git --version | cut -d' ' -f3 | cut -d'.' -f1-2)
|
if sort --help | grep -q -- -V; then
|
||||||
minimum_version=2.34
|
# If GIT has SSH signing support, enable it
|
||||||
if [ "$(printf '%s\n' "$minimum_version" "$git_version" | sort -V | head -n1)" = "$minimum_version" ]; then
|
git_version=$(git --version | cut -d' ' -f3 | cut -d'.' -f1-2)
|
||||||
set -x
|
minimum_version=2.34
|
||||||
ln -sf $EWCONFIG_ROOT/configs/git/config-fragments/enable-signing.gitconfig ~/.config/git/config-fragments/enable-signing.gitconfig
|
if [ "$(printf '%s\n' "$minimum_version" "$git_version" | sort -V | head -n1)" = "$minimum_version" ]; then
|
||||||
|
set -x
|
||||||
|
ln -sf $EWCONFIG_ROOT/configs/git/config-fragments/enable-signing.gitconfig ~/.config/git/config-fragments/enable-signing.gitconfig
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user