summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Inglis <Brian.Inglis@SystematicSW.ab.ca>2017-07-06 03:35:34 -0600
committerCorinna Vinschen <corinna@vinschen.de>2017-07-06 18:36:38 +0200
commit74dd44c0de0c991179938a9d80f54f79ded06f1d (patch)
tree785f17233d63e8df75a69c113345ac8c8259e725
parent9eafa44d2328a7d00f0921c30516ee979a61556a (diff)
downloadcygnal-74dd44c0de0c991179938a9d80f54f79ded06f1d.tar.gz
cygnal-74dd44c0de0c991179938a9d80f54f79ded06f1d.tar.bz2
cygnal-74dd44c0de0c991179938a9d80f54f79ded06f1d.zip
fix URL shortcuts launch with cygstart, create shortcuts directly in SM/Programs/Cygwin
-rwxr-xr-xwinsup/doc/etc.postinstall.cygwin-doc.sh12
1 files 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