bin: Remove unused scripts
This commit is contained in:
parent
b07e235865
commit
6627f790da
4 changed files with 0 additions and 106 deletions
|
|
@ -1,71 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
timestamp() {
|
||||
date "+%Y-%m-%dT%H:%M:%S%z"
|
||||
}
|
||||
|
||||
log() {
|
||||
echo "[$(timestamp)]" "$@"
|
||||
}
|
||||
|
||||
notify() {
|
||||
title="$1"
|
||||
body="$2"
|
||||
log "${body}"
|
||||
notify-send "${title}" "${body}"
|
||||
}
|
||||
|
||||
prompt_continue() {
|
||||
read -rp 'Press ENTER to continue > '
|
||||
}
|
||||
|
||||
default_workflow() {
|
||||
root=$(git rev-parse --show-toplevel)
|
||||
cat "${root}/.gh-autosquash-default-workflow"
|
||||
}
|
||||
|
||||
branch="${1-$(git symbolic-ref --short HEAD)}"
|
||||
workflow="${2-$(default_workflow)}"
|
||||
|
||||
data=$(gh pr view "${branch}" --json 'body,number,title')
|
||||
body=$(jq -r '.body' <<< "${data}")
|
||||
number=$(jq -r '.number' <<< "${data}")
|
||||
title=$(jq -r '.title' <<< "${data}")
|
||||
|
||||
log "Squash-merging PR #${number}: ${branch}"
|
||||
|
||||
# Use the commit title and description as the commit message by default.
|
||||
commit_title=$(vipe <<< "${title} (#${number})"); unset title
|
||||
commit_message=$(vipe <<< "${body}"); unset body
|
||||
|
||||
log "Waiting for workflow: ${workflow}"
|
||||
|
||||
gh run list \
|
||||
--branch "${branch}" \
|
||||
--workflow "${workflow}" \
|
||||
--json 'status,databaseId' \
|
||||
--jq '.[] | select(.status != "completed") | .databaseId' \
|
||||
| xargs -n 1 gh run watch
|
||||
|
||||
notify "${branch}" 'Workflow complete!'
|
||||
|
||||
log "Confirming squash-merge for ${branch} (#${number})"
|
||||
echo ''
|
||||
echo '|------------------------------------------------------------------------------|-------------------|'
|
||||
echo "${commit_title}"
|
||||
echo ''
|
||||
echo "${commit_message}"
|
||||
echo '|------------------------------------------------------------------------------|-------------------|'
|
||||
echo ''
|
||||
|
||||
prompt_continue
|
||||
|
||||
gh pr merge "${branch}" \
|
||||
--squash \
|
||||
--delete-branch \
|
||||
--subject "${commit_title}" \
|
||||
--body "${commit_message}"
|
||||
|
||||
notify "${branch}" 'PR merged!'
|
||||
6
bin/pipe
6
bin/pipe
|
|
@ -1,6 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
command=$1
|
||||
file=$(mktemp --suffix=$2)
|
||||
cat < /dev/stdin > $file
|
||||
$command $file
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
# https://github.com/ludovicchabant/vim-gutentags/issues/206#issuecomment-422984864
|
||||
|
||||
rusty-tags vi
|
||||
mv rusty-tags.vi tags.temp
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
from datetime import datetime
|
||||
from pathlib import Path
|
||||
import subprocess
|
||||
|
||||
HOME = Path.home()
|
||||
image_dir = HOME / 'images/wallpapers/BitDay'
|
||||
dest = HOME / 'images/wallpaper.png'
|
||||
|
||||
hour = datetime.now().hour
|
||||
image_number = int(hour / 2)
|
||||
|
||||
target = image_dir / '{}.png'.format(image_number)
|
||||
|
||||
# ln -s -f
|
||||
dest.unlink(missing_ok = True)
|
||||
dest.symlink_to(target)
|
||||
|
||||
# nitrogen --restore
|
||||
subprocess.run(['nitrogen', '--restore'])
|
||||
Loading…
Add table
Add a link
Reference in a new issue