SI
SI
discoversearch

We've detected that you're using an ad content blocking browser plug-in or feature. Ads provide a critical source of revenue to the continued operation of Silicon Investor.  We ask that you disable ad blocking while on Silicon Investor in the best interests of our community.  If you are not using an ad blocker but are still receiving this message, make sure your browser's tracking protection is set to the 'standard' level.
Politics : Formerly About Advanced Micro Devices

 Public ReplyPrvt ReplyMark as Last ReadFilePrevious 10Next 10PreviousNext  
To: Thomas A Watson who wrote (1022289)6/22/2017 2:11:03 PM
From: d[-_-]b  Read Replies (1) of 1572776
 
for and case are not abstractions and greatly simplfy your script -

Here is what I mean for those two sections that appear nearly identical.

Create the LINK's as needed.

for LINK in gdarg_w gdarg_t gdarg_d gdarg_pro01 gdarg_pro02 gdarg_pro03 gdarg_pro04
do
[ ! -L /usr/local/bin/$LINK ] && ln -s /usr/local/bin/dgoogle /usr/local/bin/$LINK
done

Launch using the validated commands

case $command in
gdarg_w | gdarg_t | gdarg_d | gdarg_pro01 | gdarg_pro02 | gdarg_pro03 | gdarg_pro04 )
google-chrome-stable --user-data-dir="/home/$user/.config/google-chrome/$command" &
esac
Report TOU ViolationShare This Post
 Public ReplyPrvt ReplyMark as Last ReadFilePrevious 10Next 10PreviousNext