blob: a9b26a00b09a748ca579c538c4f54a9e1c3bb69b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
#!/bin/bash
#
# Git templater module.
#
# Parameters
SHARE="$1"
# Include basic functions
source $SHARE/templater/functions || exit 1
# Git implementation
function templater_git {
if [ ! -d ".git" ]; then
templater_echo "Setting up git..."
touch .gitignore
templater_user_input GIT_USER User "-> Choose a git user name"
templater_user_input GIT_EMAIL user@example.org "-> Choose a git email address"
templater_install_makefile $SHARE/git/files/Makefile.git
git init
git config user.name "$GIT_USER"
git config user.email "$GIT_EMAIL"
git add .
git commit -m "Initial import"
else
templater_echo "Git already set"
fi
}
# Dispatch
templater_git
|