2023-02-22 08:31:38 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
cd /usr/ports
|
|
|
|
|
|
|
|
[ ! -z "$1" ] && EXTRA="-q $1"
|
|
|
|
|
|
|
|
_ports=$(echo "SELECT PkgPath from Paths;" \
|
|
|
|
| sqlite3 /usr/local/share/sqlports \
|
2023-04-26 08:32:14 +02:00
|
|
|
| sort -u | sed 's,^,/usr/ports/,g')
|
2023-02-22 08:31:38 +01:00
|
|
|
|
2023-03-06 08:14:38 +01:00
|
|
|
_list=$(find /usr/ports/mystuff/*/* /usr/src/*/* /usr/xenocara/*/* /usr/src /usr/xenocara /usr/ports -type d -maxdepth 0)
|
2023-02-22 08:31:38 +01:00
|
|
|
|
2023-04-26 08:32:14 +02:00
|
|
|
print "$_ports\n$_list\n/usr/src\n/usr/ports\n/usr/www\n/usr/xenocara" \
|
2023-02-22 08:31:38 +01:00
|
|
|
| grep -v "/CVS" \
|
|
|
|
| while IFS= read -r l; do echo "${#l} $((++n)) $l"; done \
|
2023-04-26 08:32:14 +02:00
|
|
|
| sort -un \
|
2023-02-22 08:31:38 +01:00
|
|
|
| cut -d" " -f3- \
|
|
|
|
| fzf $EXTRA -e -i -0 -1 +s --preview "tree {1}"
|