delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/09/03/03:17:19

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Fri, 3 Sep 2004 17:17:05 +1000 (EST)
From: luke DOT kendall AT cisra DOT canon DOT com DOT au
Subject: How does a script find where Cygwin is installed?
To: cygwin AT cygwin DOT com
MIME-Version: 1.0
Message-Id: <20040903071705.D26FB8512B@pessard.research.canon.com.au>

$ CYGPATH=`cygpath -w /`
$ echo $CYGPATH
C:\cygwin
$ CYGPATH=`cygpath -u "$CYGPATH"`
$ echo $CYGPATH
/

What I really want to get is "C:/cygwin" or "/cygdrive/c/cygwin", in my
case.  Look at the weird messages I get from this chmod:

$ chmod -R ug+rwX,o+rX /
chmod: getting attributes of `//bin: No such file or directory
chmod: getting attributes of `//cisrastartx.bat: No such file or directory
chmod: getting attributes of `//cisraxinit.sh: No such file or directory
chmod: getting attributes of `//cygwin.bat: No such file or directory
chmod: getting attributes of `//cygwin.ico: No such file or directory
chmod: getting attributes of `//etc: No such file or directory
chmod: getting attributes of `//home: No such file or directory
chmod: getting attributes of `//lib: No such file or directory
chmod: getting attributes of `//opt: No such file or directory
chmod: getting attributes of `//remap-drives.sh: No such file or directory
chmod: getting attributes of `//sbin: No such file or directory
chmod: getting attributes of `//tmp: No such file or directory
chmod: getting attributes of `//tmp.luke._c_i_s_r_a_s_t_a_r_t_x_._b_a_t_: No such file or directory
chmod: getting attributes of `//tmp.luke._c_i_s_r_a_x_w_i_n_._s_h_: No such file or directory
chmod: getting attributes of `//tmp.luke._s_t_a_r_t_x_: No such file or directory
chmod: getting attributes of `//tmp.luke._s_t_a_r_t_x_-_-_-_c_l_i_p_b_o_a_r_d_0_: No such file or directory
chmod: getting attributes of `//tmp.luke._s_t_a_r_t_x_-_-_-_m_u_l_t_i_w_i_n_d_o_w_0_: No such file or directory
chmod: getting attributes of `//tmp.luke._s_t_a_r_t_x_._b_a_t_: No such file or directory
chmod: getting attributes of `//tmp.luke._s_t_a_r_t_x_w_i_n_._s_h_: No such file or directory
chmod: getting attributes of `//tmp.luke._X_0_-_m_u_l_t_i_w_i_n_d_o_w_: No such file or directory
chmod: getting attributes of `//tmp.luke._x_i_n_i_t_-_-_-_k_b_-_c_l_i_p_b_o_a_r_d_: No such file or directory
chmod: getting attributes of `//usr: No such file or directory
chmod: getting attributes of `//var: No such file or directory

Here's an ls of /:

$ ls /
bin              tmp.luke._X_0_-_m_u_l_t_i_w_i_n_d_o_w_
cisrastartx.bat  tmp.luke._c_i_s_r_a_s_t_a_r_t_x_._b_a_t_
cisraxinit.sh    tmp.luke._c_i_s_r_a_x_w_i_n_._s_h_
cygwin.bat       tmp.luke._s_t_a_r_t_x_
cygwin.ico       tmp.luke._s_t_a_r_t_x_-_-_-_c_l_i_p_b_o_a_r_d_0_
etc              tmp.luke._s_t_a_r_t_x_-_-_-_m_u_l_t_i_w_i_n_d_o_w_0_
home             tmp.luke._s_t_a_r_t_x_._b_a_t_
lib              tmp.luke._s_t_a_r_t_x_w_i_n_._s_h_
opt              tmp.luke._x_i_n_i_t_-_-_-_k_b_-_c_l_i_p_b_o_a_r_d_
remap-drives.sh  usr
sbin             var
tmp

(I'm doing this to try to ensure that if a SysAdmin user installs
Cygwin for the actual owner of the machine, the owner will later have
permission to update or even uninstall Cygwin themselves.)

luke


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019