remove unused extra args that would conflict with an implied repo

This commit is contained in:
LuKe Tidd 2022-11-18 16:51:57 -05:00
parent 2bf4e928dd
commit 3db78cdda9
4 changed files with 9 additions and 36 deletions

12
gclone
View File

@ -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

View File

@ -1,3 +0,0 @@
#!/bin/bash
printf 'git commit -S -m "YOUR_COMMIT_MESSAGE"\n'

10
gpull
View File

@ -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
View File

@ -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