On 2017-07-06 02:02, Corinna Vinschen wrote: > On Jul 5 12:35, Brian Inglis wrote: >> On 2017-07-05 12:01, Corinna Vinschen wrote: >>> On Jul 5 13:44, Ken Brown wrote: >>>> On 7/5/2017 1:27 PM, Corinna Vinschen wrote: >>>>> On Jul 5 11:20, Brian Inglis wrote: >>>>>> On 2017-07-05 08:27, Corinna Vinschen wrote: >>>>>>> On Jul 5 13:32, Nellis, Kenneth wrote: >>>>>>>> So, these are handy links to have, I guess, but is it appropriate for >>>>>>>> cygwin-doc.sh to presume that the directory exists? Maybe it should >>>>>>>> create it >>>>>>>> rather than simply bail out and complain if it doesn't exist. >>>>>>> >>>>>>> In theory, the script should only create the files if the directory >>>>>>> exists. Brian? >>>>>> >>>>>> Okay - assumed the directory would always be created by setup - >>>>>> presumably not true - but do not check that assumption in pi, although >>>>>> thought about it - >>>>> >>>>> User's can decline creating shortcuts in setup. >>>>> >>>>>> should I check and skip creating shortcuts, rather than create dir and >>>>>> shorcuts? Should I also check and skip rm in prerm? And provide >>>>>> patches? >>>>> >>>>> Skipping goes hand in hand with the fact that the user declined the >>>>> Start Menu shortcut creation. >>>> >>>> The script already does check and skip. The only issue is that it skips by >>>> calling 'exit 2' instead of 'exit 0', which is what led to the original >>>> post. >>> >>> Note to myself: read source before talking about it. >> >> Patch(es) attached - shuffled the order of a few things to fail quietly in >> postinstall - changed preremove to look and take a similar approach to >> postinstall for consistency - format-patch should apply cleanly this time.
>> From 92a3dd37dc9f0da65f958707d93d9e11b6047bd8 Mon Sep 17 00:00:00 2001 >> From: Brian Inglis <brian.ing...@systematicsw.ab.ca> >> Date: Wed, 5 Jul 2017 12:28:54 -0600 >> Subject: [PATCH] fix cygwin-doc postinstall/preremove no SMPrograms/Cygwin >> dir > > Pushed. Thanks - sorry but this needs another fix - aargh! Testing reveals problems with URL shortcuts to cygwin.com. Don't know which shortcuts I was testing? Maybe others created manually in $APPDATA/SM/Programs/Cygwin? Attached format-patch fix to launch URLs with cygstart to make these work. Added mkshortcut options to create directly in SM/Programs/Cygwin, dropping cd. -- Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada
From 959be4b67fbf6c654ab58a2417338ccede731288 Mon Sep 17 00:00:00 2001 From: Brian Inglis <brian.ing...@systematicsw.ab.ca> Date: Thu, 6 Jul 2017 03:35:34 -0600 Subject: [PATCH] fix URL shortcuts launch with cygstart, create shortcuts directly in SM/Programs/Cygwin --- winsup/doc/etc.postinstall.cygwin-doc.sh | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/winsup/doc/etc.postinstall.cygwin-doc.sh b/winsup/doc/etc.postinstall.cygwin-doc.sh index 1d41ef0c1..2873d9395 100755 --- a/winsup/doc/etc.postinstall.cygwin-doc.sh +++ b/winsup/doc/etc.postinstall.cygwin-doc.sh @@ -12,6 +12,7 @@ doc=/usr/share/doc/cygwin-doc site=https://cygwin.com cygp=/bin/cygpath mks=/bin/mkshortcut +launch=/bin/cygstart html=$doc/html @@ -26,7 +27,7 @@ do done # check for programs -for p in $cygp $mks +for p in $cygp $mks $launch do if [ ! -x $p ] then @@ -38,7 +39,7 @@ done # Cygwin Start Menu directory smpc_dir="$($cygp $CYGWINFORALL -P -U --)/Cygwin" -# check Cygwin Start Menu directory still exists +# check Cygwin Start Menu directory exists [ -d "$smpc_dir/" ] || exit 0 # check Cygwin Start Menu directory writable @@ -48,13 +49,10 @@ then exit 1 fi -# mkshortcut works only in current directory - change to Cygwin Start Menu -cd "$smpc_dir/" || exit 0 # quit if not found - # create User Guide and API PDF and HTML shortcuts while read target name desc do - [ -r $t ] && $mks -n "$name" -d "$desc" $target + [ -r $t ] && $mks $CYGWINFORALL -P -n "Cygwin/$name" -d "$desc" -- $target done <<EOF $doc/cygwin-ug-net.pdf User\ Guide\ \(PDF\) Cygwin\ User\ Guide\ PDF $html/cygwin-ug-net/index.html User\ Guide\ \(HTML\) Cygwin\ User\ Guide\ HTML @@ -65,7 +63,7 @@ EOF # create Home Page and FAQ URL link shortcuts while read target name desc do - $mks -n "$name" -d "$desc" $target + $mks $CYGWINFORALL -P -n "Cygwin/$name" -d "$desc" -a $target -- $launch done <<EOF $site/index.html Home\ Page Cygwin\ Home\ Page\ Link $site/faq.html FAQ Cygwin\ Frequently\ Asked\ Questions\ Link -- 2.13.2