summaryrefslogtreecommitdiff
path: root/packages/git.source.sh
diff options
context:
space:
mode:
authorPaul Buetow <pbuetow@mimecast.com>2021-05-20 17:51:07 +0100
committerPaul Buetow <git@mx.buetow.org>2021-05-21 05:11:05 +0100
commit65f8a2497bad58619d0cfdc76e4a0efeb15e0306 (patch)
tree7d48e069ea8aaf0384f63dc7f8cf5477aa7f9848 /packages/git.source.sh
parent9f8424f2e09db260ae85db7a326fb1aea6ae1902 (diff)
initial macos support
Diffstat (limited to 'packages/git.source.sh')
-rw-r--r--packages/git.source.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/packages/git.source.sh b/packages/git.source.sh
index ca1f475..c502b00 100644
--- a/packages/git.source.sh
+++ b/packages/git.source.sh
@@ -1,5 +1,9 @@
# Add a static content file to git
git::add () {
+ if [[ "$USE_GIT" != yes ]]; then
+ return
+ fi
+
local -r content_dir="$CONTENT_BASE_DIR/$1"; shift
local file="$1"; shift
file=${file/$content_dir/.\/}
@@ -11,6 +15,10 @@ git::add () {
# Remove a static content file from git
git::rm () {
+ if [[ "$USE_GIT" != yes ]]; then
+ return
+ fi
+
local -r content_dir="$CONTENT_BASE_DIR/$1"; shift
local file="$1"; shift
file=${file/$content_dir/.\/}
@@ -22,6 +30,10 @@ git::rm () {
# Commit all changes
git::commit () {
+ if [[ "$USE_GIT" != yes ]]; then
+ return
+ fi
+
local -r content_dir="$CONTENT_BASE_DIR/$1"; shift
local -r message="$1"; shift