aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Carlson <ace@debian-eeepc>2018-06-18 16:00:56 -0400
committerAndy Carlson <ace@debian-eeepc>2018-06-18 16:00:56 -0400
commit913b07e06a83b980f95f622abb11a9f03f0c6af1 (patch)
treedd1db2013fafb382a47e37d8fa6ebd491ee58112
parent8ec9539eafb846f7d241a1ba537ca36b31738de1 (diff)
fixed newlinesHEADmaster
-rwxr-xr-x[-rw-r--r--]checks/php5check.sh.m40
-rwxr-xr-xchecks/php7check.sh.m470
2 files changed, 35 insertions, 35 deletions
diff --git a/checks/php5check.sh.m4 b/checks/php5check.sh.m4
index 4f4c574..4f4c574 100644..100755
--- a/checks/php5check.sh.m4
+++ b/checks/php5check.sh.m4
diff --git a/checks/php7check.sh.m4 b/checks/php7check.sh.m4
index e27019b..e3ef402 100755
--- a/checks/php7check.sh.m4
+++ b/checks/php7check.sh.m4
@@ -1,35 +1,35 @@
-#!/bin/bash
-
-##############################
-# sends the follows JSON to webhook:
-#
-# { "value1":"<php7-version>" }
-##############################
-
-CHECKDIR="BASEDIR"
-CONFDIR="$CHECKDIR/conf"
-
-IFTTTKEY="KEYTEXT"
-
-php7versiondata() {
- curl -s http://php.net/downloads.php 2>/dev/null | \
- grep -A1 'Current Stable' | awk '/^[ \t]*PHP 7/ { print $2 }'
-}
-
-if [ "$1" == "cache" ]; then
- php7versiondata > $CONFDIR/php7ver
-else
- if [ ! -f $CONFDIR/php7ver ]; then
- echo "Caching PHP 7 version"
- $0 cache
- else
- php7versiondata > /tmp/php7ver
- diff /tmp/php7ver $CONFDIR/php7ver
- if [ $? -eq 1 ] && [ $(grep '^[0-9\.]\+$' /tmp/php7ver | wc -l) -eq 1 ]; then
- mv /tmp/php7ver $CONFDIR/php7ver
- echo "{\"value1\":\"$(cat $CONFDIR/php7ver)\"}" |curl -X POST -d ''"$(cat -)"'' -H "Content-type: application/json" https://maker.ifttt.com/trigger/{php7version}/with/key/$IFTTTKEY
- else
- echo "skipping"
- fi
- fi
-fi
+#!/bin/bash
+
+##############################
+# sends the follows JSON to webhook:
+#
+# { "value1":"<php7-version>" }
+##############################
+
+CHECKDIR="BASEDIR"
+CONFDIR="$CHECKDIR/conf"
+
+IFTTTKEY="KEYTEXT"
+
+php7versiondata() {
+ curl -s http://php.net/downloads.php 2>/dev/null | \
+ grep -A1 'Current Stable' | awk '/^[ \t]*PHP 7/ { print $2 }'
+}
+
+if [ "$1" == "cache" ]; then
+ php7versiondata > $CONFDIR/php7ver
+else
+ if [ ! -f $CONFDIR/php7ver ]; then
+ echo "Caching PHP 7 version"
+ $0 cache
+ else
+ php7versiondata > /tmp/php7ver
+ diff /tmp/php7ver $CONFDIR/php7ver
+ if [ $? -eq 1 ] && [ $(grep '^[0-9\.]\+$' /tmp/php7ver | wc -l) -eq 1 ]; then
+ mv /tmp/php7ver $CONFDIR/php7ver
+ echo "{\"value1\":\"$(cat $CONFDIR/php7ver)\"}" |curl -X POST -d ''"$(cat -)"'' -H "Content-type: application/json" https://maker.ifttt.com/trigger/{php7version}/with/key/$IFTTTKEY
+ else
+ echo "skipping"
+ fi
+ fi
+fi