dot

packages and services management
Log | Files | Refs | README

commit 1f3b5896aa2de0fddf04f6ff0e85b3d24bd798d7
parent 2040c65b16c1964391ae2c2f0c4855025e688e2e
Author: Josuah Demangeon <mail@josuah.net>
Date:   Tue,  9 Jan 2018 20:42:39 +0100

more efficient implementation of new with less shell (find-based)

Diffstat:
Mbin/back | 9++++++---
Mbin/io-mail | 5+++--
Acron/backup | 1+
Mpack/entr/build | 2++
Mwpa_supplicant | 8++++++++
5 files changed, 20 insertions(+), 5 deletions(-)

diff --git a/bin/back b/bin/back @@ -11,12 +11,15 @@ case $1 in (up) [ -e "$BACK/new" ] && exit 1 - find . -type f | sort | while read -r path - do [ "$log" -nt "$path" ] && grep -F "$path" "$log" || $sum "$path" - done | tee "$BACK/new" | while read -r hash path + find . -type f '(' \ + -exec test "$log" -nt {} ';' \ + -exec grep -F {} "$log" ';' -o \ + -exec $sum {} + \ + ')' | tee "$BACK/new" | while read -r hash path do [ -f "$BACK/obj/$hash.xz" ] || xz -ck "$path" > "$BACK/obj/$hash.xz" done + sort "$BACK/new" -o "$BACK/new" rev=$($sum "$BACK/new" | sed 's/ .*//') mv "$BACK/new" "$BACK/rev/$rev" date +"%Y-%m-%d-%H-%M-%S $rev" >> $BACK/log diff --git a/bin/io-mail b/bin/io-mail @@ -1,8 +1,9 @@ -#!/bin/sh +#!/bin/sh -e export LC_COLLATE=C -mdirs "$HOME/.cache/mail" | sort | while IFS='' read -r dir +cd "$HOME/.cache/mail" +mdirs . | sort | while IFS='' read -r dir do printf '%s\t%s\n' "$(mlist -s "$dir" | wc -l)" "${dir#$PWD/}" done | iomenu -p mail | cut -f 2 | mlist | mthread | msort -r -d | mseq -S | mscan -f '%6n %u %D %20f %t%2i%120S' | iomenu -p mail | diff --git a/cron/backup b/cron/backup @@ -0,0 +1 @@ +0 6 * * * mpop && mblaze-filter diff --git a/pack/entr/build b/pack/entr/build @@ -1,3 +1,5 @@ +#!/bin/sh + ./configure make PREFIX="$OPT" install diff --git a/wpa_supplicant b/wpa_supplicant @@ -24,6 +24,14 @@ ctrl_interface_group=wheel #} network={ + ssid="IONIS" + key_mgmt=WPA-EAP + eap=TTLS PEAP + identity="josuah.demangeon@epitech.eu" + password="XXX" +} + +network={ ssid="SFR_2016" #psk="XXX" }