From e59210c4ec5ba18122825f675277088a893e0265 Mon Sep 17 00:00:00 2001 From: kyodev Date: Mon, 17 Jul 2017 23:41:52 +0200 Subject: [PATCH] 2.4.3 pour tests --- scripts/getFlashPlayer | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/scripts/getFlashPlayer b/scripts/getFlashPlayer index 9531da9..363ce38 100755 --- a/scripts/getFlashPlayer +++ b/scripts/getFlashPlayer @@ -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"