Update 2023-09-12 22:25 OpenBSD/amd64-x13

This commit is contained in:
c0dev0id 2023-09-12 22:25:33 +02:00
parent a442d37d55
commit 76aeb5288c
4 changed files with 66 additions and 17 deletions

View File

@ -48,6 +48,7 @@ mkbase() {
mkxenocara() {
set -xe
doas chown -R sdk /usr/xenocara
cd /usr/xenocara
doas make clean
doas make bootstrap

View File

@ -3,12 +3,50 @@
[ -z "$1" ] && exit 0
cd /usr/ports/$1
FOUND=0
show() {
echo
echo "+--------------------------------------------------------------------"
printf "| Package: $PWD\n" | sed 's|/usr/ports/||g'
echo "+--------------------------------------------------------------------"
make show="COMMENT FULLPKGNAME HOMEPAGE SITES MAINTAINER DESCR" \
| tr -s " " \
| awk 'NR == 1 { print "| COMMENT: "$0 } \
NR == 2 { print "| DISTNAME: "$0 } \
NR == 3 { print "| HOMEPAGE: "$0 } \
NR == 4 { print "| SITES: "$0 } \
NR == 5 { print "| MAINTAINER: "$0 } \
NR == 5 { print "+--------------------------------------------------------------------" } \
NR == 6 { print "\nDESCRIPTION: "; system("/bin/cat " $0); }'
}
showsub() {
count=0
find * \
-type d \
-maxdepth 0 \
| grep -vE distfiles\|pobj\|plist\|CVS\|.git \
| while read line
do
if [ -d $line/pkg ] \
&& [ -f $line/Makefile ]
then
(cd $line && show)
count=$(( count + 1 ))
fi
if [ $count -gt 10 ]
then
break
fi
done
}
if [ -d pkg ] \
&& [ -f Makefile ]
then
show
else
showsub
fi
make show="COMMENT FULLPKGNAME HOMEPAGE MASTER_SITES MAINTAINER DESCR" \
| tr -s " " \
| awk 'NR == 1 { print " COMMENT: "$0 } \
NR == 2 { print " DISTNAME: "$0 } \
NR == 3 { print " HOMEPAGE: "$0 } \
NR == 4 { print "MASTER_SITES: "$0 } \
NR == 5 { print " MAINTAINER: "$0 } \
NR == 6 { print "DESCRIPTION: "; system("/bin/cat " $0); }'

View File

@ -13,8 +13,7 @@ _ports=$(find \
openbsd-wip/* \
-type d \
-maxdepth 1 \
| grep -v -E distfiles\|pobj\|plist\|CVS)
| grep -v -E distfiles\|pobj\|plist\|CVS\|.git)
print "$_ports" \
| fzf -e -i -0 -1 +s \

25
.kshrc
View File

@ -100,6 +100,11 @@ export BUPSTASH_REPOSITORY BUPSTASH_KEY_COMMAND
PASSWORD_STORE_ENABLE_EXTENSIONS=true
export PASSWORD_STORE_ENABLE_EXTENSIONS
# PORTS
MAKE_JOBS=8
FETCH_PACKAGES=No
export MAKE_JOBS FETCH_PACKAGES
########################################################################
# PROMPT (SIMPLE)
########################################################################
@ -130,7 +135,7 @@ alias web-edit='ssh home.codevoid.de "cd web && make edit"'
alias ebay="chrome https://www.ebay-kleinanzeigen.de/m-nachrichten.html &"
alias sbl="chrome https://scottsbasslessons.com &"
alias remake="make clean=all && MAKE_JOBS=8 make"
alias remake="make clean=all && make"
alias refake="rm -f pkg/*.orig; make clean=fake && make fake"
alias reinstall="remake && make reinstall"
@ -374,11 +379,15 @@ export CVSROOT=sdk@cvs.openbsd.org:/cvs
alias cvs-diff="doas -u sdk cvs -d $CVSROOT diff -uNp"
alias cvs-commit="doas -u sdk cvs -d $CVSROOT commit"
alias cvs-update="doas -u sdk cvs -z 1 -d $CVSROOT -q up -Pd -A"
cvs-update-all() {
for p in ports src xenocara www; do
cd /usr/$p && cvs-update;
done
}
cvs-update-all() {(
set -x
cd /usr/ports && cvs-update \
&& cd /usr/src && cvs-update \
&& cd /usr/xenocara && cvs-update \
&& cd /usr/www && cvs-update
)}
alias cvs-release="doas -u sdk cvs -d $CVSROOT release"
alias cvs-checkout="doas -u sdk cvs -z 1 -qd $CVSROOT checkout -P"
cvs-import-simulate() {
@ -400,9 +409,11 @@ set_autoconf() {
# PORTS
portclean() {(
set -x
cd /usr/ports
doas rm -rf pobj/* plist logs packages bulk update distfiles/*
doas make fix-permissions > /dev/null
mkdir -p plist logs packages bulk update
doas make fix-permissions
)}
pmark() { pwd > /var/cache/pmark; }
p() { cd "$(</var/cache/pmark)"; }