-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Improve Bash quoting and remove deprecations
- Loading branch information
1 parent
35100b4
commit 6c22a1f
Showing
11 changed files
with
40 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#!/usr/bin/env bash | ||
|
||
SINCE="last week" | ||
test $# -ne 0 && SINCE=$@ | ||
test $# -ne 0 && SINCE=$* | ||
echo "... commits since $SINCE" >&2 | ||
git log --pretty='%an - %s' --after="@{$SINCE}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,7 @@ test -z "$url" && abort "github repo needs to be specified as an argument" | |
|
||
# validate user | ||
echo "Enter your github username" | ||
read user | ||
read -r user | ||
[ -n "$user" ] || abort "git username required" | ||
# personal access token | ||
# config name is github-personal-access-token '_' is not allowed in git config | ||
|
@@ -23,7 +23,7 @@ test -z "$github_personal_access_token" && abort "git config git-extras.github-p | |
|
||
# extract owner + project from repo url | ||
project=${url##*/} | ||
owner=${url%/$project} | ||
owner=${url%/"$project"} | ||
project=${project%.git} | ||
if [[ $owner == git@* ]]; then | ||
owner=${owner##*:} | ||
|
@@ -32,7 +32,7 @@ else | |
fi | ||
|
||
# validate | ||
[ -z "$project" -o -z "$owner" ] && abort "github repo needs to be specified as an argument" | ||
[[ -z "$project" || -z "$owner" ]] && abort "github repo needs to be specified as an argument" | ||
|
||
# create fork | ||
curl -qsf \ | ||
|
@@ -44,7 +44,7 @@ curl -qsf \ | |
[ $? = 0 ] || abort "fork failed" | ||
|
||
echo "Add GitHub remote branch via SSH (you will be prompted to verify the server's credentials)? (y/n)" | ||
read use_ssh | ||
read -r use_ssh | ||
# Check if user has ssh configured with GitHub | ||
if [ -n "$use_ssh" ] && ssh -T [email protected] 2>&1 | grep -qi 'success'; then | ||
remote_prefix="[email protected]:" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters