From 9dd957cd58734f08e8ed49d6103eabccff5cd2c9 Mon Sep 17 00:00:00 2001 From: eug-vs Date: Sat, 27 Mar 2021 03:40:35 +0300 Subject: feat: update scripts --- .local/bin/screenshot.sh | 2 +- .local/bin/ttl.sh | 2 +- .local/bin/update_mirrorlist.sh | 9 +++++++++ 3 files changed, 11 insertions(+), 2 deletions(-) create mode 100755 .local/bin/update_mirrorlist.sh diff --git a/.local/bin/screenshot.sh b/.local/bin/screenshot.sh index 0fa365a..66d9c5c 100755 --- a/.local/bin/screenshot.sh +++ b/.local/bin/screenshot.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # Screenshot via ImageMagick # Passes all args down to import command diff --git a/.local/bin/ttl.sh b/.local/bin/ttl.sh index 2fa2a16..20c13e5 100755 --- a/.local/bin/ttl.sh +++ b/.local/bin/ttl.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # Fix default TTL and disable ipv6 making changes permanent # TODO: replace wlo1 with automatically detected device name diff --git a/.local/bin/update_mirrorlist.sh b/.local/bin/update_mirrorlist.sh new file mode 100755 index 0000000..551a0c7 --- /dev/null +++ b/.local/bin/update_mirrorlist.sh @@ -0,0 +1,9 @@ +#!/bin/sh +# Update mirrorlist + +export TMPFILE=$(mktemp) + +sudo true # Force password prompt in the beginning +rate-arch-mirrors --max-delay=21600 | tee -a $TMPFILE +sudo mv /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist-backup +sudo mv $TMPFILE /etc/pacman.d/mirrorlist -- cgit v1.2.3