Greetings, Achim Gratz!
> Tatsuro MATSUOKA writes:
>> However,I have no confidence that I kill all other cygwin-x86 process
>> at that time. I will take care during cygwin setup process.
> Install procps and just issue "pkill ." in an admin shell (or make a
> shortcut for that) if you want to be sure.
That's a bit of a requirement. Considering this can be resolved with no external
packages.
--
With best regards,
Andrey Repin
Thursday, March 17, 2016 15:57:48
Sorry for my terrible english...
#!/bin/sh
net session > /dev/null 2>&1 || {
echo Not elevated.
exit 1
}
# Cygwin upgrade helper script.
# Usage:
#
# install-cygwin.sh [ ports ]
#
# If you intend to use it for new installs, you will need minimal bootstrap
# including POSIX shell interpreter and wget utility.
#
# You will have to edit the script to provide mirror URL of your choice.
#
# The script assumes existing installation of the same architecture as
# the host operating system.
# If you want to install 32-bit Cygwin on 64-bit host, override
# $ARCH with value other than "x86_64".
# F.e.
#
# ARCH=x86 ./install-cygwin.sh
# Mirror URL - don't include trailing slash!
MIRROR="${MIRROR:-http://ftp-stud.hs-esslingen.de/pub/Mirrors/sources.redhat.com/cygwin}"
# System architecture.
ARCH="${ARCH:-$(uname -m)}"
# Localization is fine... as long as you don't show it to other people.
export LANG=C
if [ "$ARCH" != "x86_64" ]; then
ARCH=x86
fi
# Crude test for other Cygwin processes running.
if [ "$1" != "--force" ]; then
TTY=$(tty)
test $(ps -al | grep -vE "\<${TTY##/dev/}\>" | wc -l) -gt 1 && {
echo There\'s likely other processes running from Cygwin environment.
echo Please stop them or use --force to suppress this test.
exit 1
}
else
shift
fi
wget -N "http://cygwin.com/setup-${ARCH}.exe"
if [ "$1" = "ports" ]; then
KEYS="-K http://cygwinports.org/ports.gpg -s ""${MIRROR%%/}ports/"
shift
fi
./setup-${ARCH}.exe -O -s "${MIRROR%%/}/" $KEYS $* &
sleep 2
taskkill /IM "sh.exe" /F
--
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