~yerinalexey/dotfiles

aae204e38a6fbeac0c79cc4532fb4211d2b2ada7 — Alexey Yerin a month ago c2d5094
style: prefer to use "" where possible

The exceptions are sed/awk/jq/etc scripts.
4 files changed, 8 insertions(+), 8 deletions(-)

M scripts/mpd-shuffle
M scripts/rel
M scripts/sht
M scripts/submit-paste
M scripts/mpd-shuffle => scripts/mpd-shuffle +1 -1
@@ 11,5 11,5 @@
mpc playlist | \
	grep -n . | \
	shuf -n 1 | \
	cut -d':' -f1 | \
	cut -d":" -f1 | \
	xargs -r -I{} mpc play {} >/dev/null

M scripts/rel => scripts/rel +4 -4
@@ 2,16 2,16 @@

# Make a release

tag="$(git describe --tags 2>/dev/null | cut -d'-' -f1)"
tag="$(git describe --tags 2>/dev/null | cut -d"-" -f1)"

if [ -z "$tag" ]; then
	printf "No tags\n"
	exit 1
fi

major="$(printf '%s' "$tag" | cut -d'.' -f1)"
minor="$(printf '%s' "$tag" | cut -d'.' -f2)"
patch="$(printf '%s' "$tag" | cut -d'.' -f3)"
major="$(printf "%s" "$tag" | cut -d"." -f1)"
minor="$(printf "%s" "$tag" | cut -d"." -f2)"
patch="$(printf "%s" "$tag" | cut -d"." -f3)"

case "$1" in
	major)

M scripts/sht => scripts/sht +2 -2
@@ 7,9 7,9 @@ region=""
pick_color() {
	color=$(
		grim -g "$(slurp -p)" -t ppm - | \
			convert - -format '%[pixel:p{0,0}]' txt:- | \
			convert - -format "%[pixel:p{0,0}]" txt:- | \
			tail -1 | \
			grep '#' | \
			grep "#" | \
			awk '{print $3}'
	)
	[ -z "$color" ] && exit

M scripts/submit-paste => scripts/submit-paste +1 -1
@@ 34,7 34,7 @@ visibility=unlisted
filename=""
unnamed=0

while getopts 'n:Nv:dc' opt; do
while getopts "n:Nv:dc" opt; do
	case "$opt" in
		n) filename="$OPTARG" ;;
		N) filename="" unnamed=1 ;;