diff options
| author | Paul Buetow <git@mx.buetow.org> | 2021-05-19 20:01:47 +0100 |
|---|---|---|
| committer | Paul Buetow <git@mx.buetow.org> | 2021-05-21 05:11:05 +0100 |
| commit | 14822623456972b0dbe9dc5b6c36b701bb6ec7f1 (patch) | |
| tree | 75ff9e661c682b7bad6aa2dc59eb12ad5622ef6b /packages/git.source.sh | |
| parent | afd9fdf7ca0800c457959b540c4378d20f802dc0 (diff) | |
Removal of Makefile and some fixes/refactorings
Diffstat (limited to 'packages/git.source.sh')
| -rw-r--r-- | packages/git.source.sh | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/packages/git.source.sh b/packages/git.source.sh index 1484e93..ec8e853 100644 --- a/packages/git.source.sh +++ b/packages/git.source.sh @@ -2,22 +2,22 @@ git::add () { local -r content_dir="$CONTENT_BASE_DIR/$1"; shift local file="$1"; shift - file=${file/$content_dir/} + file=${file/$content_dir/.\/} - cd $content_dir - echo git add $file - cd - + cd "$content_dir" &>/dev/null + git add "$file" + cd - &>/dev/null } # Remove a static content file from git git::rm () { local -r content_dir="$CONTENT_BASE_DIR/$1"; shift local file="$1"; shift - file=${file/$content_dir/} + file=${file/$content_dir/.\/} - cd $content_dir - echo git rm $file - cd - + cd "$content_dir" &>/dev/null + git rm "$file" + cd - &>/dev/null } # Commit all changes @@ -25,7 +25,7 @@ git::commit () { local -r content_dir="$CONTENT_BASE_DIR/$1"; shift local -r message="$1"; shift - cd $content_dir - echo git commit -a -m "$message" - cd - + cd "$content_dir" &>/dev/null + git commit -a -m "$message" + cd - &>/dev/null } |
