remove unused extra args that would conflict with an implied repo
This commit is contained in:
parent
2bf4e928dd
commit
3db78cdda9
12
gclone
12
gclone
@ -16,27 +16,19 @@ if [[ -z "$token" ]]; then
|
||||
pass show gitea/token >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
gpg_key='75D6600BEF4E8E8F'
|
||||
token_url="https://luke:${token}@git.drheck.dev/luke/${project}.git"
|
||||
url="https://luke@git.drheck.dev/luke/${project}.git"
|
||||
|
||||
if [[ "$project" == 'pass' ]]; then
|
||||
if [[ -n "$@" ]]; then
|
||||
pass git pull "$@" "$token_url"
|
||||
else
|
||||
pass git pull "token_url"
|
||||
fi
|
||||
else
|
||||
if [[ -n "$@" ]]; then
|
||||
readarray -t out <<< "$(git clone "$@" "$token_url" 2>&1)"
|
||||
else
|
||||
readarray -t out <<< "$(git clone "$token_url" 2>&1)"
|
||||
fi
|
||||
new_dir="$(awk -F\' '{print $2}' <<< "$out")"
|
||||
cd "$new_dir"
|
||||
gpg_key='75D6600BEF4E8E8F'
|
||||
git config user.signingkey "$gpg_key"!
|
||||
git config commit.gpgsign true
|
||||
|
||||
git remote remove origin
|
||||
git push --set-upstream "$url" main
|
||||
fi
|
||||
|
10
gpull
10
gpull
@ -13,22 +13,14 @@ if [[ -z "$token" ]]; then
|
||||
pass show gitea/token >&2
|
||||
exit 1
|
||||
fi
|
||||
gpg_key='75D6600BEF4E8E8F'
|
||||
url="https://luke:${token}@git.drheck.dev/luke/${project}.git"
|
||||
if [[ "$project" == 'pass' ]]; then
|
||||
pass git config user.signingkey "$gpg_key"!
|
||||
pass git config commit.gpgsign true
|
||||
if [[ -n "$@" ]]; then
|
||||
pass git pull "$@" "$url"
|
||||
else
|
||||
pass git pull "$url"
|
||||
fi
|
||||
else
|
||||
gpg_key='75D6600BEF4E8E8F'
|
||||
git config user.signingkey "$gpg_key"!
|
||||
git config commit.gpgsign true
|
||||
if [[ -n "$@" ]]; then
|
||||
git pull "$@" "$url"
|
||||
else
|
||||
git pull "$url"
|
||||
fi
|
||||
fi
|
||||
|
8
gpush
8
gpush
@ -18,17 +18,9 @@ url="https://luke:${token}@git.drheck.dev/luke/${project}.git"
|
||||
if [[ "$project" == 'pass' ]]; then
|
||||
pass git config user.signingkey "$gpg_key"!
|
||||
pass git config commit.gpgsign true
|
||||
if [[ -n "$@" ]]; then
|
||||
pass git push "$@" "$url"
|
||||
else
|
||||
pass git push "$url"
|
||||
fi
|
||||
else
|
||||
git config user.signingkey "$gpg_key"!
|
||||
git config commit.gpgsign true
|
||||
if [[ -n "$@" ]]; then
|
||||
git push "$@" "$url"
|
||||
else
|
||||
git push "$url"
|
||||
fi
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user