* [PATCH] Do not confuse MinGW/MSYS users with talking about Cygwin when rebasing
@ 2013-05-02 8:10 Sebastian Schuberth
2013-05-23 20:41 ` Sebastian Schuberth
0 siblings, 1 reply; 3+ messages in thread
From: Sebastian Schuberth @ 2013-05-02 8:10 UTC (permalink / raw)
To: cygwin; +Cc: jason
Hi,
here's a small patch against the rebase 4.4.0-1 package to the rebaseall / peflagsall scripts that avoid talking about "cygwin" when running under MSYS / MinGW to not confuse the user.
diff -Nur a/peflagsall.in b/peflagsall.in
--- a/peflagsall.in Mon Apr 30 15:37:16 2012
+++ b/peflagsall.in Thu May 2 09:54:24 2013
@@ -43,10 +43,22 @@
exit 1
}
+# Determine platform
+Platform=`uname -s`
+case $Platform in
+ *MINGW* | *mingw* ) Platform=MinGW ;;
+ *CYGWIN* | *cygwin* ) Platform=Cygwin ;;
+ *MSYS* | *msys* ) Platform=MSYS ;;
+ * )
+ echo "Unsupported platform: $Platform" 1>&2
+ exit 1
+ ;;
+esac
+
long_help ()
{
echo "$usage_string"
- echo "When invoked with no arguments, $ProgramName modifies every cygwin $DefaultSuffixes"
+ echo "When invoked with no arguments, $ProgramName modifies every $Platform $DefaultSuffixes"
echo "on the system: .exe files have their tsaware flag set, while .dll, .so and .oct"
echo "files have their dynamicbase flag removed. However, if any of [-d|-t|-s] are"
echo "specified then ONLY the actions so specified will occur."
@@ -137,22 +149,10 @@
# First see if caller requested help
check_args_for_help "$@"
-# Determine platform
-Platform=`uname -s`
-case $Platform in
- *MINGW* | *mingw* ) Platform=mingw ;;
- *CYGWIN* | *cygwin* ) Platform=cygwin ;;
- *MSYS* | *msys* ) Platform=msys ;;
- * )
- echo "Unsupported platform: $Platform" 1>&2
- exit 1
- ;;
-esac
-
# Verify only ash or dash processes are running
ProcessResult=0
case $Platform in
- mingw|msys )
+ MinGW|MSYS )
/bin/ps -s | /bin/gawk '\
# Count number of running ash or dash. \
/\/bin\/(d)?ash(\.exe)?$/{ ash_cnt++; } \
@@ -174,7 +174,7 @@
}'
ProcessResult=$?
;;
- cygwin )
+ Cygwin )
grep -E -q -i -v '/d?ash(.exe)?$' /proc/[0-9]*/exename
ProcessResult=$?
;;
@@ -182,7 +182,7 @@
if [ $ProcessResult -eq 0 -a -z "$RebaseDebug" ]
then
echo "$ProgramName: only ash or dash processes are allowed during this process."
- echo " Exit all Cygwin processes and stop all Cygwin services."
+ echo " Exit all $Platform processes and stop all $Platform services."
echo " Execute ash (or dash) from Start/Run... or a cmd or command window."
echo " Execute '/bin/peflagsall' from ash (or dash)."
exit 2
@@ -256,14 +256,14 @@
# Create file list
case $Platform in
- cygwin)
+ Cygwin)
find /etc/setup -name '*.lst.gz' | xargs gzip -d -c |
grep -E "\.($Suffixes)\$" |
sed -e '/cygwin1\.dll$/d' -e '/cyglsa.*\.dll$/d' \
-e '/sys-root\/mingw/d' -e 's/^/\//' \
-e '/d?ash\.exe$/d' -e '/peflags\.exe$/d' >"${TmpFile}"
;;
- msys)
+ MSYS)
for f in /bin /lib
do
find $f -type f |
@@ -273,7 +273,7 @@
-e '/peflags\.exe$/d' >>"$TmpFile"
done
;;
- mingw) ;; # no automatic files; only command line
+ MinGW) ;; # no automatic files; only command line
esac
# Append user supplied file list, if any
diff -Nur a/rebaseall.in b/rebaseall.in
--- a/rebaseall.in Thu Jun 7 20:50:34 2012
+++ b/rebaseall.in Wed Apr 24 20:49:55 2013
@@ -79,9 +79,9 @@
# Determine platform
Platform=`uname -s`
case $Platform in
- *MINGW* | *mingw* ) Platform=mingw ;;
- *CYGWIN* | *cygwin* ) Platform=cygwin ;;
- *MSYS* | *msys* ) Platform=msys ;;
+ *MINGW* | *mingw* ) Platform=MinGW ;;
+ *CYGWIN* | *cygwin* ) Platform=Cygwin ;;
+ *MSYS* | *msys* ) Platform=MSYS ;;
* )
echo "Unsupported platform: $Platform" 1>&2
exit 1
@@ -124,7 +124,7 @@
then
ProcessResult=0
case $Platform in
- mingw|msys )
+ MinGW|MSYS )
/bin/ps -s | /bin/gawk '\
# Count number of running ash or dash. \
/\/bin\/(d)?ash(\.exe)?$/{ ash_cnt++; } \
@@ -146,7 +146,7 @@
}'
ProcessResult=$?
;;
- cygwin )
+ Cygwin )
grep -E -q -i -v '/d?ash(.exe)?$' /proc/[0-9]*/exename
ProcessResult=$?
;;
@@ -154,7 +154,7 @@
if [ $ProcessResult -eq 0 -a -z "${RebaseDebug}" ]
then
echo "${ProgramName}: only ash or dash processes are allowed during rebasing"
- echo " Exit all Cygwin processes and stop all Cygwin services."
+ echo " Exit all $Platform processes and stop all $Platform services."
echo " Execute ash (or dash) from Start/Run... or a cmd or command window."
echo " Execute '/bin/rebaseall' from ash (or dash)."
exit 2
@@ -199,7 +199,7 @@
# Create rebase list
case $Platform in
- cygwin)
+ Cygwin)
find /etc/setup -name '*.lst.gz' | xargs gzip -d -c |
grep -E "\.($Suffixes)\$" |
sed -e '/\/cygwin1\.dll$/d' -e '/\/cyglsa.*\.dll$/d' \
@@ -209,7 +209,7 @@
# dynamicbase flag removed.
NoDyn='-n'
;;
- mingw|msys)
+ MinGW|MSYS)
for f in /bin /lib
do
find $f -type f |
--
Sebastian Schuberth
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Do not confuse MinGW/MSYS users with talking about Cygwin when rebasing
2013-05-02 8:10 [PATCH] Do not confuse MinGW/MSYS users with talking about Cygwin when rebasing Sebastian Schuberth
@ 2013-05-23 20:41 ` Sebastian Schuberth
2013-05-23 21:15 ` Sebastian Schuberth
0 siblings, 1 reply; 3+ messages in thread
From: Sebastian Schuberth @ 2013-05-23 20:41 UTC (permalink / raw)
To: cygwin
On 02.05.2013 10:05, Sebastian Schuberth wrote:
> here's a small patch against the rebase 4.4.0-1 package to the rebaseall / peflagsall scripts that avoid talking about "cygwin" when running under MSYS / MinGW to not confuse the user.
Any comments on the patch?
--
Sebastian Schuberth
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Do not confuse MinGW/MSYS users with talking about Cygwin when rebasing
2013-05-23 20:41 ` Sebastian Schuberth
@ 2013-05-23 21:15 ` Sebastian Schuberth
0 siblings, 0 replies; 3+ messages in thread
From: Sebastian Schuberth @ 2013-05-23 21:15 UTC (permalink / raw)
To: cygwin
On 02.05.2013 10:05, Sebastian Schuberth wrote:
> here's a small patch against the rebase 4.4.0-1 package to the rebaseall / peflagsall scripts that avoid talking about "cygwin" when running under MSYS / MinGW to not confuse the user.
Any comments on the patch?
--
Sebastian Schuberth
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-05-23 20:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-02 8:10 [PATCH] Do not confuse MinGW/MSYS users with talking about Cygwin when rebasing Sebastian Schuberth
2013-05-23 20:41 ` Sebastian Schuberth
2013-05-23 21:15 ` Sebastian Schuberth
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).