tmpfile now unique now unique
This commit is contained in:
parent
346e838672
commit
26adb70a24
@ -9,13 +9,14 @@ fi
|
|||||||
|
|
||||||
muttdir="$HOME/.config/mutt/"
|
muttdir="$HOME/.config/mutt/"
|
||||||
|
|
||||||
createMailboxes() { rm -f /tmp/log /tmp/lognew
|
createMailboxes() { \
|
||||||
offlineimap --info -a $1 2&> /tmp/log
|
tmpdir=$(mktemp -d)
|
||||||
sed -n '/^Folderlist/,/^Folderlist/p' /tmp/log |
|
offlineimap --info -a $1 2&> "$tmpdir"/log
|
||||||
grep "^ " | sed -e "s/\//./g;s/(.*//g;s/^ //g" > /tmp/lognew
|
sed -n '/^Folderlist/,/^Folderlist/p' "$tmpdir"/log |
|
||||||
while read box; do mkdir -p "$HOME/.mail/$1/$box"; done </tmp/lognew ;}
|
grep "^ " | sed -e "s/\//./g;s/(.*//g;s/^ //g" > "$tmpdir"/lognew
|
||||||
|
while read box; do mkdir -p "$HOME/.mail/$1/$box"; done <"$tmpdir"/lognew ;}
|
||||||
|
|
||||||
chooseSync() { (crontab -l && testSync) || dialog --msgbox "No cronjob manager detected. Please install one and return to enable automatic mailsyncing" 10 60 ;}
|
chooseSync() { (cat /var/run/crond.pid && testSync) || dialog --msgbox "No cronjob manager detected. Please install one and return to enable automatic mailsyncing" 10 60 ;}
|
||||||
testSync() { (crontab -l | grep .config/mutt/etc/mailsync && removeSync) || addSync ;}
|
testSync() { (crontab -l | grep .config/mutt/etc/mailsync && removeSync) || addSync ;}
|
||||||
|
|
||||||
addSync() { min=$(dialog --inputbox "How many minutes should be between mail syncs?" 8 60 3>&1 1>&2 2>&3 3>&-)
|
addSync() { min=$(dialog --inputbox "How many minutes should be between mail syncs?" 8 60 3>&1 1>&2 2>&3 3>&-)
|
||||||
|
Loading…
Reference in New Issue
Block a user