Update 2024-01-02 10:00 OpenBSD/amd64-x13

This commit is contained in:
c0dev0id 2024-01-02 10:00:21 +01:00
parent 113c982b05
commit 9abd6d3c64
13 changed files with 14 additions and 159 deletions

View File

@ -1,2 +0,0 @@
#!/bin/sh
vim -c "'0"

View File

@ -1,8 +0,0 @@
#!/bin/ksh -i
f="$(cat /var/cache/dmark)"
cd "$(dirname "$f")"
owner="$(stat -f %Su "$f")"
doas chown sdk "$f"
vim "$f"
doas chown $owner "$f"

View File

@ -1,2 +0,0 @@
#!/bin/sh
cd /usr/src/sys && cscope -qkCRf /home/sdk/cscope.out "$@"

View File

@ -1,2 +0,0 @@
#!/bin/sh
cd /usr/src/sys && cscope -qkCRf /home/sdk/cscope.out -1 "$@"

View File

@ -1,2 +0,0 @@
#!/bin/sh
cd /usr/src/sys && cscope -qkCRf /home/sdk/cscope.out -0 "$@"

View File

@ -1,26 +0,0 @@
#!/bin/sh
cd /usr/ports
[ ! -z "$1" ] && EXTRA="-q $1"
_ports=$(find \
/usr/ports/* \
/usr/ports/mystuff/* \
/usr/ports/openbsd-wip/* \
-type d \
-maxdepth 1 \
| grep -v -E distfiles\|pobj\|plist\|CVS)
_sys=$(find /usr/src/*/* -type d -maxdepth 0 \
| grep -v -E distfiles\|pobj\|plist\|CVS)
_system=\
"/usr/src
/usr/src/sys
/usr/xenocara
/usr/www
/usr/ports"
echo "$_ports\n$_system\n$_sys" \
| sort -u | fzf $EXTRA -e -i -0 -1 --preview "cat {1}/Makefile"

View File

@ -1,8 +0,0 @@
#!/bin/sh
set -ex
for _f in $(find . -name "*.rej")
do
vim -O ${_f%*.rej} $_f
done

View File

@ -1,3 +0,0 @@
#!/bin/sh
cd /home/sdk/code \
&& ugrep -ir "$@" *-src

View File

@ -1,29 +0,0 @@
#!/bin/sh
. ~/.bin/_config
set -xe
# save dev bookmark
DEVDIR="${PWD}"
echo "${DEVDIR}" > "${DEVDIRPATH}/dir"
# create files list
find "${DEVDIR}" -type f \
\( -name "*.c" \
-o -name "*.cc" \
-o -name "*.cpp" \
-o -name "*.c" \
-o -name "*.h" \
-o -name "*.hh" \
-o -name "*.hpp" \
\) > ${DEVDIRPATH}/files
# create cscope database
cscope -qbkCRvf ${DEVDIRPATH}/cscope.out -i${DEVDIRPATH}/files
# create tags file
uctags --sort=yes \
--fields=afiksSt \
--extras=fq \
--totals=yes \
-L ${DEVDIRPATH}/files \
-f ${DEVDIRPATH}/tags

View File

@ -1,46 +0,0 @@
#!/bin/sh
. ~/.bin/_config
doas chown -R sdk /home/sdk/.dev
set -xe
# save dev bookmark
DEVDIR="${PWD}"
echo "${DEVDIR}" > "/home/sdk/.dev/dir"
# create files list
find "${DEVDIR}" /usr/local/include /usr/xenocara/{lib,proto} -type f \
\( -name "*.c" \
-o -name "*.h" \
\) -not \
\( -path "*/gnu/*" \
-o -path "*/share/*" \
-o -path "*/alpha/*" \
-o -path "*/arm/*" \
-o -path "*/arm64/*" \
-o -path "*/armv7/*" \
-o -path "*/hppa/*" \
-o -path "*/i386/*" \
-o -path "*/landisk/*" \
-o -path "*/loongson/*" \
-o -path "*/luna88k/*" \
-o -path "*/m88k/*" \
-o -path "*/macppc/*" \
-o -path "*/mips64/*" \
-o -path "*/octeon/*" \
-o -path "*/powerpc/*" \
-o -path "*/powerpc64/*" \
-o -path "*/riscv64/*" \
-o -path "*/sh/*" \
-o -path "*/sparc64/*" \
\) > /home/sdk/.dev/files
# create cscope database
cscope -qbkCRvf /home/sdk/.dev/cscope.out -i/home/sdk/.dev/files
# create tags file
ectags --sort=yes \
--fields=afiksSt \
--extra=fq \
--totals=yes \
-L /home/sdk/.dev/files \
-f /home/sdk/.dev/tags

View File

@ -1,29 +0,0 @@
#!/bin/sh
. ~/.bin/_config
doas chown -R sdk /home/sdk/.dev
set -xe
# save dev bookmark
DEVDIR="${PWD}"
echo "${DEVDIR}" > "/home/sdk/.dev/dir"
# create files list
find "${DEVDIR}" /usr/include /usr/local/include -type f \
\( -name "*.c" \
-o -name "*.cc" \
-o -name "*.cpp" \
-o -name "*.h" \
-o -name "*.hh" \
-o -name "*.hpp" \
\) > /home/sdk/.dev/files
# create cscope database
cscope -qbkCRvf /home/sdk/.dev/cscope.out -i/home/sdk/.dev/files
# create tags file
ectags --sort=yes \
--fields=afiksSt \
--extra=fq \
--totals=yes \
-L /home/sdk/.dev/files \
-f /home/sdk/.dev/tags

View File

@ -1,2 +0,0 @@
#!/bin/sh
portroach-cli -m codevoid

View File

@ -62,6 +62,20 @@ alias proot-rebuild="_prootrebuild"
alias proot-shell="_prootshell"
alias dpb-make="_dpbmake"
# other
alias port-roach="portroach-cli -m codevoid"
alias developers="_listdevs"
_listdevs() {
ssh $ME@cvs.openbsd.org 'fgrep -v ksh- /etc/passwd' \
| egrep 111\|122 \
| grep -v gitsync \
| cut -d: -f1,5 | tr -s ',' \
| sed 's/,/, /g;s/,[, ]*$//g' \
| column -s":" -t \
| fzf -i -e
}
#
# FUNCTIONS