Merge pull request #13 from lahwaacz/master

Fixed bug in handling the default value of 'binlist' array
pull/14/merge
Ghost1227 12 years ago
commit 89429799eb

@ -85,10 +85,12 @@ cktimeout=${cktimeout:-30}
# Offer all available sessions in /etc/X11/Sessions, # Offer all available sessions in /etc/X11/Sessions,
# if binlist if not explicitly set in cdmrc. # if binlist if not explicitly set in cdmrc.
if [[ "${#binlist[@]}" == 0 ]]; then if [[ "$binlist" == "()" ]]; then
binlist=($(ls /etc/X11/Sessions)) binlist=($(find /etc/X11/Sessions -maxdepth 1 -type f))
flaglist=($(sed 's/[[:digit:]]\+/X/g' <<< ${!flaglist[*]})) for ((i=0; i<${#binlist[@]}; i++)); do
namelist=(${binlist[@]^}) declare flaglist[$i]="X"
declare namelist[$i]=$(basename ${binlist[$i]})
done
fi fi
# Generate the main menu. # Generate the main menu.

Loading…
Cancel
Save