2.4.3 pour tests

This commit is contained in:
kyodev 2017-07-17 23:41:52 +02:00
parent 75ce798cb9
commit e59210c4ec
1 changed files with 7 additions and 3 deletions

View File

@ -1,6 +1,6 @@
#!/bin/bash
version=2.4.2
version=2.4.3
date="17/07/2017"
projet="Kyodev"
contact="https://framagit.org/kyodev/kyopages/issues"
@ -121,12 +121,14 @@ fscript_install(){
fi
mkdir -p /opt/bin/
cp -d "$(basename $0)" /opt/bin/"$script"
chmod a+wx /opt/bin/"$script"
chmod a+wx "/opt/bin/$script"
if [ "$?" != "0" ]; then f__error "chmod sur: /opt/bin/$script"; fi
ln -s /opt/bin/"$script" /usr/local/bin/"$script" &>/dev/null
# cron/anacron install
fscript_cronAnacron install
else # mise à jour
chmod a+wx "$(basename $0)"
if [ "$?" != "0" ]; then f__error "chmod sur: $(basename $0)"; fi
cp -d "$(basename $0)" /opt/bin/"$script"
fi
[ -f "$script"_changelog.md ] || rm "$(basename $0)" &>/dev/null ## on efface pas si changelog (dev)
@ -159,8 +161,10 @@ fscript_dl(){
if [ "$uptd_script" != "ko" ]; then return 0; fi
dirTemp="/tmp/$script-$RANDOM/"
mkdir -p "$dirTemp"
wget -q --show-progress --tries=1 --timeout=15 --user-agent="$user_agent" -O "$dirTemp$script" "$urlScript" && chmod +x "$script"
wget -q --show-progress --tries=1 --timeout=15 --user-agent="$user_agent" -O "$dirTemp$script" "$urlScript"
if [ "$?" != "0" ]; then f__testWget "$urlScript"; fi
chmod +x "$script"
if [ "$?" != "0" ]; then f__error "chmod sur: $script"; fi
cp -d "$dirTemp$script" /opt/bin/"$script"
rm "$dirTemp$script"
echo ""; f__info "$script mis à jour en version $versionScript"