diff options
Diffstat (limited to 'network/weathercli/weathercli.SlackBuild')
-rw-r--r-- | network/weathercli/weathercli.SlackBuild | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/network/weathercli/weathercli.SlackBuild b/network/weathercli/weathercli.SlackBuild index c7bb18238f..a8071cde86 100644 --- a/network/weathercli/weathercli.SlackBuild +++ b/network/weathercli/weathercli.SlackBuild @@ -2,7 +2,7 @@ # Slackware build script for weathercli -# Copyright 2014-2016 Dimitris Zlatanidis Orestiada, Greece +# Copyright 2014-2018 Dimitris Zlatanidis Orestiada, Greece # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -25,7 +25,7 @@ PRGNAM=weathercli VERSION=${VERSION:-2.3.1} -BUILD=${BUILD:-2} +BUILD=${BUILD:-3} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then @@ -70,6 +70,20 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; +if [ "$API_KEY" = "" ]; then + echo "" + echo "API_KEY not found !!! Please pass the script your API Key" + echo "API_KEY=my_api_key_here ./weathercli.SlackBuild" + echo "Get your API Key on this page : https://openweathermap.org/" + echo "" + exit 1 +fi + +# Patch API Key +API_KEY=${API_KEY} +echo $API_KEY +echo $API_KEY | sed -i "s/&units={1}/\&units={1}\&appid=$API_KEY/" weathercli.py + # rename executable sed -i "s/bin\/weather/bin\/weathercli/" setup.py mv bin/weather bin/weathercli |