[PATCH] Cygwin: doc: Update postinstall/preremove scripts
Corinna Vinschen
corinna-cygwin@cygwin.com
Mon Mar 13 09:31:06 GMT 2023
Hi Jon,
On Mar 8 14:17, Jon Turney wrote:
> Update postinstall/preremove scripts to use CYGWIN_START_MENU_SUFFIX and
> CYGWIN_SETUP_OPTIONS.
It would be great if you could explain your change in the commit
message...
> winsup/doc/etc.postinstall.cygwin-doc.sh | 19 +++++++++++++++----
> winsup/doc/etc.preremove.cygwin-doc.sh | 8 ++++++--
> 2 files changed, 21 insertions(+), 6 deletions(-)
>
> diff --git a/winsup/doc/etc.postinstall.cygwin-doc.sh b/winsup/doc/etc.postinstall.cygwin-doc.sh
> index 97f88a16d..313c1d3ff 100755
> --- a/winsup/doc/etc.postinstall.cygwin-doc.sh
> +++ b/winsup/doc/etc.postinstall.cygwin-doc.sh
> @@ -36,9 +36,20 @@ do
> fi
> done
>
> +# setup was run with options not to create startmenu items
> +case ${CYGWIN_SETUP_OPTIONS} in
> + *no-startmenu*)
> + exit 0
> + ;;
> +esac
> +
> # Cygwin Start Menu directory
> -case $(uname -s) in *-WOW*) wow64=" (32-bit)" ;; esac
> -smpc_dir="$($cygp $CYGWINFORALL -P -U --)/Cygwin${wow64}"
> +if [ ! -v CYGWIN_START_MENU_SUFFIX ]
Isn't -v a bash extension? Ideally the shebang should reflect that.
Otherwise, -z?
Thanks,
Corinna
More information about the Cygwin-patches
mailing list