mirror of https://framagit.org/kyodev/kyopages.git
getThunderbird 2.6.0
This commit is contained in:
parent
013a201ac3
commit
0c20cb826c
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
version=2.5.0
|
||||
version=2.6.0
|
||||
date="26/01/2018"
|
||||
projet="simpledeb"
|
||||
contact="IRC freenode ##sdeb ou https://framagit.org/kyodev/kyopages/issues/"
|
||||
|
@ -145,9 +145,10 @@ f__requis(){ # 26/01/2018
|
|||
|
||||
# $@=cmd à lancer en root avec su ou sudo. si $@ contient :x: x=nombre de tentatives, sinon 2 tentatives par défaut
|
||||
# si bash inexistant, return 2
|
||||
f__sudo(){ # 14/01/2018
|
||||
local nb sudo isudo toBash options
|
||||
f__sudo(){ # 26/01/2018
|
||||
local nb sudo isudo toBash options nbDefault=2
|
||||
|
||||
# détermination sudo possible
|
||||
type -p bash &>/dev/null && toBash=$( type -p bash ) || return 2
|
||||
# sudo --shell bash équivalent su ?
|
||||
if sudo -v &>/dev/null && [ $EUID -ne 0 ] ; then
|
||||
|
@ -155,14 +156,18 @@ f__sudo(){ # 14/01/2018
|
|||
else
|
||||
sudo="su --shell $toBash --preserve-environment -c "
|
||||
fi
|
||||
if [[ "$@" =~ :??: ]]; then
|
||||
# extraction nb de tentatives éventuel
|
||||
if [[ "$@" =~ :.{1,2}: ]]; then
|
||||
nb="$@"
|
||||
nb=${nb#*:}
|
||||
nb=${nb%:*}
|
||||
else
|
||||
nb=2
|
||||
fi
|
||||
options=${@//:$nb:/ }
|
||||
(( ${nb}+1 )) 2>/dev/null || nb="$nbDefault" # test si numérique, sinon,
|
||||
else
|
||||
nb="$nbDefault"
|
||||
options="$@"
|
||||
fi
|
||||
# lancement cmds
|
||||
for (( isudo=1 ; isudo<="$nb" ; isudo++ )); do
|
||||
$sudo " $options"
|
||||
[ "$?" == 0 ] && break
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
# changelog getThunderbird
|
||||
|
||||
|
||||
## getThunderbird 2.5.0 26/01/2018
|
||||
## getThunderbird 2.6.0 26/01/2018
|
||||
|
||||
* révision: mineur, fscript_cronAnacron fscript_install fscript_remove fscript_update
|
||||
* révision: f__requis
|
||||
* fix: f__sudo, extraction nb tentatives
|
||||
|
||||
## getThunderbird 2.4.0 24/01/2018
|
||||
|
||||
|
|
Loading…
Reference in New Issue