From ac0a5bd16981fa0787ebbdb405da8a3bdec4d7d5 Mon Sep 17 00:00:00 2001 From: Hippolyte Chauvin Date: Mon, 8 May 2023 10:58:45 +0200 Subject: [PATCH 1/3] =?UTF-8?q?Shift=20pour=20ne=20pas=20repasser=20l'argu?= =?UTF-8?q?ment=20apr=C3=A8s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/mkddate | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/mkddate b/bin/mkddate index 87ccea6..82df5e0 100755 --- a/bin/mkddate +++ b/bin/mkddate @@ -1,5 +1,6 @@ #!/bin/sh -e path="${1:-.}/$(date +'%Y_%m_%d')" +shift mkdir "$@" -p "$path" echo "$path" From 4a3539f8f440731a4f8ad74ddaf12cf8c982667e Mon Sep 17 00:00:00 2001 From: Hippolyte Chauvin Date: Mon, 8 May 2023 11:02:50 +0200 Subject: [PATCH 2/3] =?UTF-8?q?R=C3=A9=C3=A9criture=20l=C3=A9g=C3=A8re=20d?= =?UTF-8?q?e=20makeprio?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/makeprio | 38 ++++---------------------------------- 1 file changed, 4 insertions(+), 34 deletions(-) diff --git a/bin/makeprio b/bin/makeprio index a2d8d69..f7c63b0 100755 --- a/bin/makeprio +++ b/bin/makeprio @@ -1,38 +1,8 @@ -#!/bin/bash +#!/bin/sh -e -# Variables -sudo=sudo -renice=renice pid="$(pidof "$1")" +shift +prio="${1:--22}" -# Error function -error() { - >&2 echo -e "\033[1;31mERROR:\033[0m $1"; shift - exit "${1:-1}" -} - -# Test if process exists -if [[ -z $pid ]]; then - error "No such process." 1 -else - shift -fi - -# Arguments -prio="${1:--20}"; shift - -# Command building -renice=( - "$sudo" - "$renice" - "$prio" - "$pid" -) - -# Debug -#echo "${renice[@]}" -#exit 0 - -# Execution -"${renice[@]}" +sudo renice "$prio" "$pid" From 6467711bdcb90c9a6b4c598d2c4b26013fb3a52d Mon Sep 17 00:00:00 2001 From: Hippolyte Chauvin Date: Mon, 8 May 2023 15:26:35 +0200 Subject: [PATCH 3/3] Ajout du README --- README.md | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..aefa9e5 --- /dev/null +++ b/README.md @@ -0,0 +1,4 @@ +# Ahurac dotfiles + +[![Please don't upload to GitHub](https://nogithub.codeberg.page/badge.svg)](https://nogithub.codeberg.page) +