diff --git a/bin/lib/debian/provisioning/install-packages.bash b/bin/lib/debian/provisioning/install-packages.bash index 4d5dd1a..89dc519 100755 --- a/bin/lib/debian/provisioning/install-packages.bash +++ b/bin/lib/debian/provisioning/install-packages.bash @@ -1,5 +1,7 @@ #!/usr/bin/env bash +sudo apt install curl gnupg2 + echo "Setting up yarn source..." curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list @@ -23,7 +25,6 @@ sudo apt install \ neovim vim \ unzip \ lua5.3 luajit \ - curl \ jq \ w3m \ ranger \ @@ -32,5 +33,5 @@ sudo apt install \ fortune \ nodejs yarn \ gawk \ - gnupg2 \ + netcat \ kitty-terminfo diff --git a/bin/pr-for-commit b/bin/pr-for-commit new file mode 100755 index 0000000..d830241 --- /dev/null +++ b/bin/pr-for-commit @@ -0,0 +1,10 @@ +#!/usr/bin/env sh + +export GITHUB_UPSTREAM="$(git remote -vv | awk '{$0=$2}')" + +git log --merges --ancestry-path --oneline $1..master \ + | grep -i 'pull request' \ + | tail -n1 \ + | awk '{$0=$5}' \ + | cut -c2- \ + | xargs -I % open https://github.com/$GITHUB_UPSTREAM/${PWD##*/}/pull/% diff --git a/bin/vdiff b/bin/vdiff index ea269a0..5801fae 100755 --- a/bin/vdiff +++ b/bin/vdiff @@ -18,6 +18,7 @@ for f in $files; do cfn="$rfn" mkdir -p "$d" + # TODO: show at ref if provided git --no-pager show HEAD:"$f" > "$d/$fn" 2>/dev/null || \ echo "" > "$d/$fn" cp "$f" "$d/$cfn" 2>/dev/null || echo "" > "$d/$cfn"