This is the mail archive of the
cygwin
mailing list for the Cygwin project.
How does a script find where Cygwin is installed?
- From: luke dot kendall at cisra dot canon dot com dot au
- To: cygwin at cygwin dot com
- Date: Fri, 3 Sep 2004 17:17:05 +1000 (EST)
- Subject: How does a script find where Cygwin is installed?
$ 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/