aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--util/fbsetbg6
1 files changed, 4 insertions, 2 deletions
diff --git a/util/fbsetbg b/util/fbsetbg
index 0cf9cfb..fb6f3af 100644
--- a/util/fbsetbg
+++ b/util/fbsetbg
@@ -511,7 +511,9 @@ if [ "$option" = random ]; then
511 exit 1 511 exit 1
512 fi 512 fi
513 if [ -d "$wallpaperdir" ]; then 513 if [ -d "$wallpaperdir" ]; then
514 number_of_wallpapers=`ls "$wallpaperdir"|wc -l` 514 cd "$wallpaperdir"
515 available_wallpapers=`find -L -type f ! -regex '.*/\..*'`
516 number_of_wallpapers=`echo "$available_wallpapers" | wc -l`
515 if find_it random_number; then 517 if find_it random_number; then
516 randomnumber=`random_number` 518 randomnumber=`random_number`
517 # some shells don't support $RANDOM 519 # some shells don't support $RANDOM
@@ -531,7 +533,7 @@ if [ "$option" = random ]; then
531 fi 533 fi
532 remember=false 534 remember=false
533 #set -x 535 #set -x
534 wallpaper="$wallpaperdir/`ls \"$wallpaperdir\"|sed -n ${wallpapernumber}p`" 536 wallpaper="`echo "$available_wallpapers" | sed -n ${wallpapernumber}p`"
535 option=$option2 # have to choose something... 537 option=$option2 # have to choose something...
536 else 538 else
537 message "Invalid random wallpaper directory specified: '$wallpaperdir'." 539 message "Invalid random wallpaper directory specified: '$wallpaperdir'."