diff --git a/winsup/doc/etc.postinstall.cygwin-doc.sh b/winsup/doc/etc.postinstall.cygwin-doc.sh index de7d9e0c3..97f88a16d 100755 --- a/winsup/doc/etc.postinstall.cygwin-doc.sh +++ b/winsup/doc/etc.postinstall.cygwin-doc.sh @@ -37,10 +37,11 @@ do done # Cygwin Start Menu directory -smpc_dir="$($cygp $CYGWINFORALL -P -U --)/Cygwin" +case $(uname -s) in *-WOW*) wow64=" (32-bit)" ;; esac +smpc_dir="$($cygp $CYGWINFORALL -P -U --)/Cygwin${wow64}" -# check Cygwin Start Menu directory exists -[ -d "$smpc_dir/" ] || exit 0 +# ensure Cygwin Start Menu directory exists +/usr/bin/mkdir -p "$smpc_dir" # check Cygwin Start Menu directory writable if [ ! -w "$smpc_dir/" ] @@ -52,7 +53,7 @@ fi # create User Guide and API PDF and HTML shortcuts while read target name desc do - [ -r "$target" ] && $mks $CYGWINFORALL -P -n "Cygwin/$name" -d "$desc" -- $target + [ -r "$target" ] && $mks $CYGWINFORALL -P -n "Cygwin${wow64}/$name" -d "$desc" -- $target done <