Update 2024-12-13 08:54 OpenBSD/amd64-t14

This commit is contained in:
c0dev0id 2024-12-13 08:54:27 +01:00
parent 17325bb534
commit ca92c8badb
6 changed files with 69 additions and 9 deletions

View File

@ -46,7 +46,7 @@ then
&& exit 1
# loop at provided files
for item in $@
for item in "$@"
do
# Work in a subshell so dir changes won't be persistent.
# Due to this, we "return" instead of "continue".
@ -55,8 +55,8 @@ then
(
# change working directory
cd "$(dirname $item)"
item="$(basename $item)"
cd "$(dirname "$item")"
item="$(basename "$item")"
# don't handle non existant files
readlink -f "$item" > /dev/null 2>&1 \
@ -89,7 +89,7 @@ fi
### handle decryption (set by -d)
if [ $encrypt -eq 0 ]
then
for item in $@
for item in "$@"
do
# Work in a subshell so dir changes won't be persistent.
# Due to this, we "return" instead of "continue".
@ -98,8 +98,8 @@ then
(
# change working directory
cd "$(dirname $item)"
item="$(basename $item)"
cd "$(dirname "$item")"
item="$(basename "$item")"
# don't handle non existant files
readlink -f "$item" > /dev/null 2>&1 \
@ -107,12 +107,12 @@ then
&& return; }
# don't handle files that are not gpg encrypted
[ ${item##*.} != "gpg" ] \
[ "${item##*.}" != "gpg" ] \
&& echo "skipping: $item (reason: not a gpg file)" \
&& return
# handle file: decrypt with gpg + delete encrypted version
[ ${item##*.} == "gpg" ] \
[ "${item##*.}" == "gpg" ] \
&& echo "$item -> ${item%.*}" \
&& gpg -q -d -o "${item%.*}" "$item" \
&& rm -f "$item" \
@ -120,7 +120,7 @@ then
# no return: fallthrough to next handler
# handle tar: if file ends in tar after decryption, untar it and delete the tar.
[ ${item##*.} == "tar" ] \
[ "${item##*.}" == "tar" ] \
&& echo "$item -> ${item%.*}" \
&& tar xf "$item" \
&& rm -f "$item"

8
.bin/port-go-modules-update Executable file
View File

@ -0,0 +1,8 @@
#!/bin/sh
. ~/.bin/_config
set -x
needs go--
make MODGO_VERSION=latest modgo-gen-modules > modules.inc

18
.bin/port-jump Executable file
View File

@ -0,0 +1,18 @@
#!/bin/sh
find /usr/ports/ \
-not \( -path "/usr/ports/pobj" -prune \
-o -path "*/distfiles" -prune \
-o -path "*/packages" -prune \
-o -path "*/logs" -prune \
-o -path "*/CVS" -prune \
-o -path "*/pkg" -prune \
-o -path "*/patches" -prune \
-o -path "*/files" -prune \
-o -path "*/openbsd-wip" -prune \
-o -path "*/mystuff" -prune \
-o -path "*/.git" -prune \
\) \
-maxdepth 4 \
-type d \
-iname "*$1*"

12
.bin/port-notes Executable file
View File

@ -0,0 +1,12 @@
#!/bin/cat
Update go:
make MODGO_VERSION=v1.49.0 modgo-gen-modules > modules.inc
make MODGO_VERSION=latest modgo-gen-modules > modules.inc
Update cargo:
make modcargo-gen-crates > crates.inc
make modcargo-gen-crates-licenses > crates.lic && mv crates.lic crates.inc
Distfile name change:
newname-${V}{oldname}${EXTRACT_SUFX}

2
.bin/port-notes-edit Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
vim /home/sdk/.bin/port-notes

20
.bin/port-search Executable file
View File

@ -0,0 +1,20 @@
#!/bin/sh
if [ -z "$1" ]
then
echo "usage: port-search <file pattern> <search term>"
exit 2
fi
type="$1"
shift
find /usr/ports/ \
-not \( -path "/usr/ports/pobj" -prune \
-o -path "*/distfiles" -prune \
-o -path "*/packages" -prune \
-o -path "*/logs" -prune \
-o -path "*/CVS" -prune \
\) \
-type f \
-iname "$type" \
-exec ugrep -F -- "$@" {} +