Update 2024-12-13 08:54 OpenBSD/amd64-t14
This commit is contained in:
parent
17325bb534
commit
ca92c8badb
@ -46,7 +46,7 @@ then
|
|||||||
&& exit 1
|
&& exit 1
|
||||||
|
|
||||||
# loop at provided files
|
# loop at provided files
|
||||||
for item in $@
|
for item in "$@"
|
||||||
do
|
do
|
||||||
# Work in a subshell so dir changes won't be persistent.
|
# Work in a subshell so dir changes won't be persistent.
|
||||||
# Due to this, we "return" instead of "continue".
|
# Due to this, we "return" instead of "continue".
|
||||||
@ -55,8 +55,8 @@ then
|
|||||||
(
|
(
|
||||||
|
|
||||||
# change working directory
|
# change working directory
|
||||||
cd "$(dirname $item)"
|
cd "$(dirname "$item")"
|
||||||
item="$(basename $item)"
|
item="$(basename "$item")"
|
||||||
|
|
||||||
# don't handle non existant files
|
# don't handle non existant files
|
||||||
readlink -f "$item" > /dev/null 2>&1 \
|
readlink -f "$item" > /dev/null 2>&1 \
|
||||||
@ -89,7 +89,7 @@ fi
|
|||||||
### handle decryption (set by -d)
|
### handle decryption (set by -d)
|
||||||
if [ $encrypt -eq 0 ]
|
if [ $encrypt -eq 0 ]
|
||||||
then
|
then
|
||||||
for item in $@
|
for item in "$@"
|
||||||
do
|
do
|
||||||
# Work in a subshell so dir changes won't be persistent.
|
# Work in a subshell so dir changes won't be persistent.
|
||||||
# Due to this, we "return" instead of "continue".
|
# Due to this, we "return" instead of "continue".
|
||||||
@ -98,8 +98,8 @@ then
|
|||||||
(
|
(
|
||||||
|
|
||||||
# change working directory
|
# change working directory
|
||||||
cd "$(dirname $item)"
|
cd "$(dirname "$item")"
|
||||||
item="$(basename $item)"
|
item="$(basename "$item")"
|
||||||
|
|
||||||
# don't handle non existant files
|
# don't handle non existant files
|
||||||
readlink -f "$item" > /dev/null 2>&1 \
|
readlink -f "$item" > /dev/null 2>&1 \
|
||||||
@ -107,12 +107,12 @@ then
|
|||||||
&& return; }
|
&& return; }
|
||||||
|
|
||||||
# don't handle files that are not gpg encrypted
|
# don't handle files that are not gpg encrypted
|
||||||
[ ${item##*.} != "gpg" ] \
|
[ "${item##*.}" != "gpg" ] \
|
||||||
&& echo "skipping: $item (reason: not a gpg file)" \
|
&& echo "skipping: $item (reason: not a gpg file)" \
|
||||||
&& return
|
&& return
|
||||||
|
|
||||||
# handle file: decrypt with gpg + delete encrypted version
|
# handle file: decrypt with gpg + delete encrypted version
|
||||||
[ ${item##*.} == "gpg" ] \
|
[ "${item##*.}" == "gpg" ] \
|
||||||
&& echo "$item -> ${item%.*}" \
|
&& echo "$item -> ${item%.*}" \
|
||||||
&& gpg -q -d -o "${item%.*}" "$item" \
|
&& gpg -q -d -o "${item%.*}" "$item" \
|
||||||
&& rm -f "$item" \
|
&& rm -f "$item" \
|
||||||
@ -120,7 +120,7 @@ then
|
|||||||
# no return: fallthrough to next handler
|
# no return: fallthrough to next handler
|
||||||
|
|
||||||
# handle tar: if file ends in tar after decryption, untar it and delete the tar.
|
# handle tar: if file ends in tar after decryption, untar it and delete the tar.
|
||||||
[ ${item##*.} == "tar" ] \
|
[ "${item##*.}" == "tar" ] \
|
||||||
&& echo "$item -> ${item%.*}" \
|
&& echo "$item -> ${item%.*}" \
|
||||||
&& tar xf "$item" \
|
&& tar xf "$item" \
|
||||||
&& rm -f "$item"
|
&& rm -f "$item"
|
||||||
|
8
.bin/port-go-modules-update
Executable file
8
.bin/port-go-modules-update
Executable 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
18
.bin/port-jump
Executable 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
12
.bin/port-notes
Executable 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
2
.bin/port-notes-edit
Executable file
@ -0,0 +1,2 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
vim /home/sdk/.bin/port-notes
|
20
.bin/port-search
Executable file
20
.bin/port-search
Executable 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 -- "$@" {} +
|
Loading…
Reference in New Issue
Block a user