cross platform!
This commit is contained in:
parent
1db8502819
commit
f0957ceb7b
8
gclone
8
gclone
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
if [[ -z "$1" ]]; then
|
||||
printf 'Need a project:\n\n' >&2
|
||||
pass show gitea/token >&2
|
||||
@ -24,7 +24,13 @@ if [[ "$project" == 'pass' ]]; then
|
||||
pass git pull "token_url"
|
||||
else
|
||||
readarray -t out <<< "$(git clone "$token_url" 2>&1)"
|
||||
printf 'out: %s\n' "${out[@]}"
|
||||
new_dir="$(awk -F\' '{print $2}' <<< "$out")"
|
||||
printf 'new dir: %s\n' "$new_dir"
|
||||
if [[ -z "$new_dir" ]]; then
|
||||
printf 'could not get dir from git clone.\n' >&2
|
||||
exit 1
|
||||
fi
|
||||
cd "$new_dir"
|
||||
|
||||
git config user.signingkey "$gpg_key"!
|
||||
|
2
gpull
2
gpull
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [[ -z "$1" ]]; then
|
||||
project="$(basename $(pwd))"
|
||||
|
2
gpush
2
gpush
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [[ -z "$1" ]]; then
|
||||
project="$(basename $(pwd))"
|
||||
|
Loading…
x
Reference in New Issue
Block a user