Quote (dare2dreamer @ Aug. 09 2005,14:23) |
Anyone know a good "idiot simple" way of detecting if the MPD_HOST and MPD_PORT variables are set, and if not prompting the user for them? I thought a little lua app would make sense for DSL, but my skills in that arena are bluntly non-existant. |
Code Sample |
if [ -z "$MPD_HOST" ]; then echo -n "Enter MPD Host:" read MPD_HOST fi if [ -z "$MPD_PORT" ]; then echo -n "Enter MPD Port:" read MPD_PORT fi export MPD_HOST MPD_PORT |