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
|
||||
|
||||
```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 ]
|
||||
do
|
||||
case "$1" in
|
||||
"--city")
|
||||
shift
|
||||
city="${1}"
|
||||
shift
|
||||
;;
|
||||
"--wallpaper-file")
|
||||
shift
|
||||
wallpaper_file="${1}"
|
||||
|
@ -96,7 +101,6 @@ if [ -z ${curl_cmd} ]; then
|
|||
exit 3
|
||||
fi
|
||||
|
||||
city="$1"
|
||||
if [[ -z ${city} ]]; then
|
||||
echo "You must indicate a city to center the image."
|
||||
exit 4
|
||||
|
|
Loading…
Reference in a new issue