add city to arguments
This commit is contained in:
parent
c73fd6c1ce
commit
77f3d8adc3
2 changed files with 6 additions and 2 deletions
|
@ -11,5 +11,5 @@ Tested with XFCE4 and Gnome 2. Problems with Gnome >3.
|
||||||
### Usage
|
### Usage
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
earth_wallpaper.sh Tampere
|
earth_wallpaper.sh --city Tampere
|
||||||
```
|
```
|
||||||
|
|
|
@ -49,6 +49,11 @@ font_name=$("${gsettings_cmd}" get org.gnome.desktop.interface font-name | sed "
|
||||||
while [ $# -gt 0 ]
|
while [ $# -gt 0 ]
|
||||||
do
|
do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
|
"--city")
|
||||||
|
shift
|
||||||
|
city="${1}"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
"--wallpaper-file")
|
"--wallpaper-file")
|
||||||
shift
|
shift
|
||||||
wallpaper_file="${1}"
|
wallpaper_file="${1}"
|
||||||
|
@ -96,7 +101,6 @@ if [ -z ${curl_cmd} ]; then
|
||||||
exit 3
|
exit 3
|
||||||
fi
|
fi
|
||||||
|
|
||||||
city="$1"
|
|
||||||
if [[ -z ${city} ]]; then
|
if [[ -z ${city} ]]; then
|
||||||
echo "You must indicate a city to center the image."
|
echo "You must indicate a city to center the image."
|
||||||
exit 4
|
exit 4
|
||||||
|
|
Loading…
Reference in a new issue