fix scripts

This commit is contained in:
thek4n 2026-05-22 15:28:08 +03:00
parent 11dfbb1ce6
commit ed8d3a6afe
40 changed files with 45 additions and 109 deletions

View File

@ -1,5 +1,4 @@
#!/bin/sh
set -eu
#!/bin/sh -eu
codes="10-0 - Офицер ранен
10-1 - Офицеру нужна помощь

View File

@ -1,5 +1,4 @@
#!/bin/sh
set -eu
#!/bin/sh -eu
ends_with_bak() {
case "${1}" in

View File

@ -1,6 +1,4 @@
#!/bin/sh
set -eum
#!/bin/sh -eum
if test -t 1; then
exec 1>/dev/null

View File

@ -1,5 +1,4 @@
#!/bin/sh
set -eu
#!/bin/sh -eu
directory="$(realpath "${1}")"

View File

@ -1,5 +1,4 @@
#!/bin/sh
set -eu
#!/bin/sh -eu
directory="$(realpath "${1}")"

View File

@ -1,5 +1,4 @@
#!/bin/sh
set -eu
#!/bin/sh -eu
readonly downloads_directory="${XDG_DOWNLOAD_DIR}"
cleanup-directory-log "${downloads_directory}"

View File

@ -1,6 +1,4 @@
#!/bin/sh
set -eu
#!/bin/sh -eu
case "${OSTYPE:-}" in

View File

@ -1,6 +1,4 @@
#!/bin/sh
set -eu
#!/bin/sh -eu
readonly filename="${1}"

View File

@ -1,8 +1,4 @@
#!/bin/sh
set -ue
#!/bin/sh -eu
readonly project_name="${1}"

View File

@ -1,5 +1,4 @@
#!/bin/sh
set -eu
#!/bin/sh -eu
emoji="😀 grinning cheerful cheery face grin grinning face happy laugh nice smile smiling teeth
😃 smiley awesome face grin happy mouth open smile smiling smiling face with open mouth teeth yay

View File

@ -1,6 +1,4 @@
#!/bin/sh
set -eu
#!/bin/sh -eu
if [ -z "${1}" ]; then

View File

@ -1,4 +1,3 @@
#!/bin/sh
set -eu
#!/bin/sh -eu
firefox --new-instance -P media --name firefox_media

View File

@ -1,6 +1,4 @@
#!/bin/sh
set -ue
#!/bin/sh -eu
LC_ALL=C
DEFAULT_PASSWORD_LENGTH=20

View File

@ -1,5 +1,3 @@
#!/bin/sh
set -ue
#!/bin/sh -eu
dd if=/dev/urandom count=16 2>/dev/null | sha256sum | head -c 64

View File

@ -1,4 +1,3 @@
#!/bin/sh
set -eu
#!/bin/sh -eu
go build -v "${@}" -o ./bin/ ./...

View File

@ -1,5 +1,4 @@
#!/bin/sh
set -eu
#!/bin/sh -eu
ESC=$(printf '\033')

View File

@ -1,5 +1,4 @@
#!/bin/sh
set -eu
#!/bin/sh -eu
statuses="100 Continue - Разрешение клиенту на продолжение отправки.
101 Switching Protocols - Переключение протоколов, исходя из указаний клиента.

View File

@ -1,5 +1,4 @@
#!/bin/sh
set -eu
#!/bin/sh -eu
if [ -t 0 ]; then
echo "${@}" | python3 -m json.tool --no-ensure-ascii

View File

@ -1,6 +1,4 @@
#!/bin/sh
set -eu
#!/bin/sh -eu
readonly name="${1}"; shift

View File

@ -1,5 +1,4 @@
#!/bin/sh
set -eu
#!/bin/sh -eu
SOCKET_PATH="/tmp/mpv-${USER}.sock"

View File

@ -1,6 +1,4 @@
#!/bin/sh
set -eu
#!/bin/sh -eu
if [ ! -e "${1}" ]; then
printf 'File %s not found' "${1}" >&2

View File

@ -1,7 +1,4 @@
#!/bin/sh
set -eu
#!/bin/sh -eu
case "${OSTYPE:-}" in
"linux-gnu"*)

View File

@ -1,5 +1,4 @@
#!/bin/sh
set -eu
#!/bin/sh -eu
trap 'exit 0' INT

View File

@ -1,5 +1,4 @@
#!/bin/sh
set -eu
#!/bin/sh -eu
PROG="$(basename "${0}")"
SOCKET_PATH="/tmp/mpv-${USER}.sock"

View File

@ -1,6 +1,4 @@
#!/bin/sh
set -eu
#!/bin/sh -eu
if [ -z "${*}" ] && [ -x "$(command -v ipython 2>/dev/null)" ]; then
ipython -i -c "q = exit"

View File

@ -1,5 +1,4 @@
#!/bin/sh
set -eu
#!/bin/sh -eu
channel="${1:-}"

View File

@ -1,4 +1,3 @@
#!/bin/sh
set -eu
#!/bin/sh -eu
gio trash "${@}"

View File

@ -1,6 +1,4 @@
#!/bin/sh
set -eu
#!/bin/sh -eu
file="$(mktemp)"
echo "Editing ${file}"

View File

@ -1,6 +1,4 @@
#!/usr/bin/env zsh
set -euo pipefail
#!/usr/bin/env -S zsh -euo pipefail
readonly LOG_FILE="${HOME}/.screenshots.log"
readonly NOTIFY_TIME_LOW_MS=1500

View File

@ -1,5 +1,4 @@
#!/bin/sh
set -eu
#!/bin/sh -eu
PROGRAM="$(basename "${0}")"

View File

@ -1,6 +1,4 @@
#!/bin/sh
set -eu
#!/bin/sh -eu
if [ -n "${2+x}" ]; then
shasum -a 256 "${@}"

View File

@ -1,6 +1,4 @@
#!/bin/sh
set -eu
#!/bin/sh -eu
readonly tips_dir="${HOME}/.tips"

View File

@ -1,7 +1,4 @@
#!/bin/sh
set -eu
#!/bin/sh -eu
if [ ! -e "${1}" ]; then
echo "file '${1}' not found" >&2

View File

@ -1,5 +1,4 @@
#!/bin/sh
set -eu
#!/bin/sh -eu
cd "${HOME}/Games/starsector"
./starsector.sh

View File

@ -1,6 +1,4 @@
#!/bin/sh
set -eu
#!/bin/sh -eu
sleep "${@}"

View File

@ -1,8 +1,6 @@
#!/bin/sh
#!/bin/sh -u
# Выполнять, пока команда падает
set -u
while ! "${@}" ; do
sleep 0.5
done

View File

@ -1,8 +1,6 @@
#!/bin/sh
#!/bin/sh -u
# Выполнять, пока команда не упадет.
set -u
while "${@}"; do
sleep 0.5
done

View File

@ -1,5 +1,4 @@
#!/bin/sh
set -eu
#!/bin/sh -eu
if "${@}"; then
beep -f 800 -l 250 -n -f 1000 -l 500

View File

@ -1,5 +1,4 @@
#!/bin/sh
set -eu
#!/bin/sh -eu
readonly city="${1}"
curl "wttr.in/${city}" 2>/dev/null | head -n -1

View File

@ -1,6 +1,4 @@
#!/bin/sh
set -ue
#!/bin/sh -eu
readonly TARGET_PATH="${HOME}"