diff options
author | Anirudh Oppiliappan <x@icyphox.sh> | 2021-09-22 11:49:11 +0530 |
---|---|---|
committer | Anirudh Oppiliappan <x@icyphox.sh> | 2021-09-22 11:49:11 +0530 |
commit | 2b87c05c6e3773f299a566323756fac133cab6bc (patch) | |
tree | 18cc3885b355f1a6b4dd9fdf7c075b2a4770c92e /pw | |
parent | f4ab00e5ac6fc80bc9a3d852ec521f1f208dbf42 (diff) | |
download | pw-2b87c05c6e3773f299a566323756fac133cab6bc.tar.gz |
Commit and push
Diffstat (limited to 'pw')
-rwxr-xr-x | pw | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -37,8 +37,17 @@ add() { | |||
37 | printf "%s" "$pass" | "$gpg" -aer "$PW_KEY" -o "$PW_DIR/$1.gpg" | 37 | printf "%s" "$pass" | "$gpg" -aer "$PW_KEY" -o "$PW_DIR/$1.gpg" |
38 | printf "pw: %s/%s.gpg created\n" "$PW_DIR" "$1" | 38 | printf "pw: %s/%s.gpg created\n" "$PW_DIR" "$1" |
39 | else | 39 | else |
40 | die "the file %s/%s.gpg exists" "$PW_DIR" "$1" | 40 | die "the file $PW_DIR/$1.gpg exists" |
41 | fi | 41 | fi |
42 | ( | ||
43 | cd $PW_DIR | ||
44 | git add . | ||
45 | git commit -m "$(date)" | ||
46 | remote="$(git remote show)" | ||
47 | branch="$(git branch --show-current)" | ||
48 | git pull -r "$remote" "$branch" | ||
49 | git push "$remote" "$branch" | ||
50 | ) | ||
42 | } | 51 | } |
43 | 52 | ||
44 | list() { | 53 | list() { |