This commit is contained in:
embed@git.macaw.me 2024-01-06 01:38:28 +00:00
commit b50fd16591
197 changed files with 41663 additions and 0 deletions

View file

@ -0,0 +1,11 @@
#!/bin/bash
# -*-mode: sh; tab-width: 8; coding: utf-8-unix -*-
PREFIX=/usr/local
ROLE=base
. /usr/local/etc/local.d/local.bash || exit 1
/usr/local/etc/local.d/Whonix-Gateway.rc || exit 2$?

View file

@ -0,0 +1,13 @@
#!/bin/bash
# -*-mode: sh; tab-width: 8; coding: utf-8-unix -*-
PREFIX=/usr/local
ROLE=base
. /usr/local/etc/local.d/local.bash || exit 1
local_guest || exit 3$?
#? local_guest_add_xorg_conf

View file

@ -0,0 +1,15 @@
#!/bin/bash
# -*-mode: sh; tab-width: 8; coding: utf-8-unix -*-
PREFIX=/usr/local
ROLE=base
local_guest_fstab_mnt
. /usr/local/etc/local.d/local.bash || exit 1
local_guest || exit 3$?
#? local_guest_add_xorg_conf

View file

@ -0,0 +1,26 @@
#!/bin/sh
# filter - arguments are to wget - quoted?
ROOTDIR=/mnt/i
ROLE=base
LARGS="-X -P /o/Cache/Apt/Devuan/4"
RARGS="--retry 1"
grep ^http | \
sed -e 's@http://@https://@g' \
| \
sed -e 's@ftp://[^ ]*@@' \
-e 's@^https://distfiles.gentoo.org/distfiles/[^ ]* https://pypi.python.org/@https://pypi.python.org/@' \
-e 's@https*://distfiles.gentoo.org@https://gentoo.osuosl.org@g' \
-e 's@https*://gentoo.osuosl.org@https://mirror.leaseweb.com/gentoo@g' \
-e 's@https*://download.sourceforge.net@https://download.sourceforge.net@g' | \
while read urls ; do
url=`echo $urls|sed -e 's@ .*@@'`
base=`basename "$url"`
[ -e /usr/portage/distfiles/$base ] && echo distfiles/$base && continue
for url in $urls ; do
/usr/local/bin/scurl.bash $LARGS -- $RARGS $url || continue
break
done
done

View file

@ -0,0 +1,42 @@
#!/bin/sh
# -*- mode: sh; fill-column: 75; tab-width: 8; coding: utf-8-unix -*-
ROLE=base
. /usr/local/bin/usr_local_tput.bash || exit 2
[ $# -eq 0 ] && USAGE $0 url-files...
cnt=beowulf-e22532c6f83a
cd /mnt/o/Cache/Apt || exit 3
cat "$@" | debian_uris_to_urls.bash \
| grep deb$ \
| while read url ; do
root=`echo $url | sed -e 's@.*DEBIAN@@'`
dir=`dirname $root`
[ -f Debian/10.6/deb.debian.org/debian/pool/$root ] || {
new=`echo $url | sed -e 's@deb.devuan.org/@mirrors.dotsrc.org/devuan/@'`
newf=`echo $new | sed -e 's@^http*:/@Devuan/3@'`
[ -f $newf ] || echo $new
continue
}
[ -h Devuan/3/deb.devuan.org/merged/pool/DEBIAN/$dir ] && \
rm Devuan/3/deb.devuan.org/merged/pool/DEBIAN/$dir
[ -d Devuan/3/deb.devuan.org/merged/pool/DEBIAN/$dir ] || \
mkdir -p Devuan/3/deb.devuan.org/merged/pool/DEBIAN/$dir
[ -f Devuan/3/deb.devuan.org/merged/pool/DEBIAN/$root ] && \
rm Devuan/3/deb.devuan.org/merged/pool/DEBIAN/$root
[ -h Devuan/3/deb.devuan.org/merged/pool/DEBIAN/$root ] && continue
ln -s $PWD/Debian/10.6/deb.debian.org/debian/pool/$root \
Devuan/3/deb.devuan.org/merged/pool/DEBIAN/$root
done
TODIR=/var/lib/lxd/storage-pools/default/containers/$cnt/rootfs
TODIR=$TODIR/var/cache/apt/archives/
find Devuan/ -name \*.deb -type l|while read file ; do \
base=`basename $file`
[ -e $TODIR/$base ] && continue
ln -s $PWD/$file $TODIR
done

View file

@ -0,0 +1,11 @@
#!/bin/sh
ROLE=base
[ $# -eq 0 ] && exit 1
apt-get remove $* </dev/null | \
sed -e '1,/The following packages will be REMOVED:/d' \
-e '/^WARNING:/,' -e 's/ /\n/g' | while read foo; do\
aptitude unmarkauto $foo ;
done

View file

@ -0,0 +1,25 @@
#!/bin/sh
# -*-mode: sh; tab-width: 8; coding: utf-8-unix -*-
# filter
[ -z "$CACHE" ] && CACHE=/mnt/o/Cache/Apt/Devuan/4
[ -d "$CACHE" ] || exit 1$?
[ -d /etc/apt ] || exit 0
cd $CACHE || exit 2
[ -d var/cache/apt/archives ] || mkdir -p var/cache/apt/archives
find *.* -type f -name \*.deb | while read file; do
base=$( basename $file )
[ ! -d /var/cache/apt/archives/ ] || \
[ -e /var/cache/apt/archives/$base ] || ln -s $PWD/$file /var/cache/apt/archives/$base
[ -f var/cache/apt/archives/$base -a ! -h var/cache/apt/archives/$base ] && rm var/cache/apt/archives/$base
[ -e var/cache/apt/archives/$base ] || ln -s $PWD/$file var/cache/apt/archives/$base
done
cd /var/cache/apt/archives||exit 4
exit 0

View file

@ -0,0 +1,29 @@
#!/bin/sh
# -*-mode: sh; tab-width: 8; coding: utf-8-unix -*-
# filter or .uris
[ -z "$CACHE" ] && CACHE=/mnt/o/Cache/Apt/Devuan/4
[ -d "$CACHE" ] || mkdir $CACHE # || exit 1$?
# debian --print-uris
if [ $? -eq 0 ] ; then
# filter
grep 'https*://' | \
sed -e 's@ftp://[^ ]*@@g' -e 's@.*https*://@https://@g' -e "s@'.*@@g" | \
while read line ; do
for url in $line ; do
base=`basename "$url"`
pre=`echo $url|sed -e "s@https*://@${CACHE}@"`
[ -e $pre ] && break
echo $line
break
done
done
fi
for elt in "$@" ; do
base=$( basename $elt .elts )
[ -s $base.urls ] && continue
sh $0 < $elt > $base.urls
[ -s $base.urls ] || rm $base.urls
done
exit 0