File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change 11#! /bin/bash
22
33case " $url " in
4- * @github.com:* ) email=" " ; name=" " ;;
5- * //github.com/* ) email=" " ; name=" " ;;
4+ * @github.com:* ) email=" " ; name=" " ; gpgid= " " ; ;
5+ * //github.com/* ) email=" " ; name=" " ; gpgid= " " ; ;
66esac
Original file line number Diff line number Diff line change @@ -33,8 +33,8 @@ cat << INPUT > ~/.git-clone-init
3333#!/bin/bash
3434
3535case "\$ url" in
36- *@github.com:* ) email=""; name="";;
37- *//github.com/* ) email=""; name="";;
36+ *@github.com:* ) email=""; name=""; gpgid=""; ;
37+ *//github.com/* ) email=""; name=""; gpgid=""; ;
3838esac
3939INPUT
4040 warn " \nMissing file ~/.git-clone-init. Template created..."
@@ -51,3 +51,10 @@ git config --local user.email "$email"
5151git config --local user.name " $name "
5252
5353echo -e " \nLocal identity for ${PWD##*/ } set to \" $name <$email >\" "
54+
55+ if [[ ! -z $gpgid ]]; then
56+ git config commit.gpgsign true
57+ git config user.signingkey $gpgid
58+
59+ echo -e " \n Repo configured to use $gpgid GPG Identity"
60+ fi
You can’t perform that action at this time.
0 commit comments