summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Luka Šijanec <anton@sijanec.eu>2023-07-18 19:59:22 +0200
committerAnton Luka Šijanec <anton@sijanec.eu>2023-07-18 19:59:22 +0200
commit8437ede36fe4a3c2921bd6ec86e8b748137054b5 (patch)
treece223ca62bab665f2a5dc1b0de2b15c0b69072d5
parentb (diff)
downloadn-8437ede36fe4a3c2921bd6ec86e8b748137054b5.tar
n-8437ede36fe4a3c2921bd6ec86e8b748137054b5.tar.gz
n-8437ede36fe4a3c2921bd6ec86e8b748137054b5.tar.bz2
n-8437ede36fe4a3c2921bd6ec86e8b748137054b5.tar.lz
n-8437ede36fe4a3c2921bd6ec86e8b748137054b5.tar.xz
n-8437ede36fe4a3c2921bd6ec86e8b748137054b5.tar.zst
n-8437ede36fe4a3c2921bd6ec86e8b748137054b5.zip
-rw-r--r--root/.bash_aliases7
-rwxr-xr-xroot/linux/dist.sh12
-rwxr-xr-xroot/posodobi.sh1
3 files changed, 18 insertions, 2 deletions
diff --git a/root/.bash_aliases b/root/.bash_aliases
index cdef3c5..1ec2481 100644
--- a/root/.bash_aliases
+++ b/root/.bash_aliases
@@ -1,7 +1,7 @@
export CT_ALLOW_BUILD_AS_ROOT_SURE=1
function register () {
- n=`curl https://www.register.si | grep nonce | head -n 1 | cut -d\" -f8`
- curl https://www.register.si/wp-admin/admin-ajax.php -X POST --data-raw "_ajax_nonce=$n&action=get_whois_data&domain=`sed s/.si\$//g <<<$1`.si" 2> /dev/null | grep "<td>" | sed "s/^\s*//g" | cut -d\< -f2 | cut -d\> -f2 | grep "[[:print:]]"
+ n=`curl -s https://www.register.si | grep nonce | head -n 1 | cut -d\" -f8`
+ curl -s https://www.register.si/wp-admin/admin-ajax.php -X POST --data-raw "_ajax_nonce=$n&action=get_whois_data&domain=`sed s/.si\$//g <<<$1`.si" | grep "<td>" | sed "s/^\s*//g" | cut -d\< -f2 | cut -d\> -f2 | grep "[[:print:]]"
}
alias r=R
alias R="R --quiet"
@@ -30,6 +30,9 @@ function upload () {
ssh upload@upload.sijanec.eu chmod 0644 "www/$d"
echo https://upload.sijanec.eu./$d | xclip
}
+function pfl () {
+ curl -s https://portagefilelist.de/index.php?fs=$1 | grep -E "(<td>.*</td>)|package" | php -r "echo strip_tags(file_get_contents('php://stdin'));" | sed 's/^[ ]*//g' | grep -v Packages | grep -v Search | grep -v Unique | grep / | tr $'\n' , | sed -e "s/\([^,]*\),\([^,]*\),/$(color green)\2$(color off) \1,/g" | tr , $'\n' | grep `sed -e 's/\*//g' <<<$1`
+}
function mcd () {
mkdir -p $@ && cd $@
}
diff --git a/root/linux/dist.sh b/root/linux/dist.sh
new file mode 100755
index 0000000..e4d3b23
--- /dev/null
+++ b/root/linux/dist.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+set -xe
+k=`eselect kernel list | tail -n1 | cut -d\ -f6`
+m=`cut -d- -f2- <<<$k`
+p=`rev <<<$0 | cut -d/ -f1 | rev`
+d=`mktemp -d -p "" $p.XXX`
+pushd $d
+dracut $m
+mv $m /boot/initramfs-$m.img
+grub-mkconfig -o /boot/grub/grub.cfg
+popd
+rm -fr $d
diff --git a/root/posodobi.sh b/root/posodobi.sh
index 4bb7dfc..b7f7216 100755
--- a/root/posodobi.sh
+++ b/root/posodobi.sh
@@ -28,3 +28,4 @@ grep "colo" <<<"$@" || f="$f --color y"
emerge --tree --verbose --update $f $a --newuse --changed-use --backtrack 30 --deep --with-bdeps=y --rebuilt-binaries --autounmask --autounmask-write @world
emerge --verbose $f --autounmask-write --autounmask @preserved-rebuild
emerge --depclean $f
+/root/linux/dist.sh