Re: some kind of path problem when running bash script from windows shortcut
Thanks, that would be interesting to learn how to do. I guess I would need to learn what files need to be backed up and how to go about restoring them to a new install. I make considerable use of clonezilla images for the OS, but when I have to do a full re-install, I am stuck with making allot of manual adjustments afterwords. LMH Andrey Repin wrote: Greetings, LMH! I added C:\cygwin\bin to the windows path. I guess I forgot environment variables when I did the re-install. One of these days I need to learn how to do post install config scripts so I don't have to spend two weeks getting my windows the way I want it. If you're thorough about your backups, you can have your user environment back up in no time, using a combination of rsync for files and ERD for registry backups. -- WBR, Andrey Repin (anrdae...@freemail.ru) 23.03.2012,<17:56> Sorry for my terrible english... -- 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 -- 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
Re: some kind of path problem when running bash script from windows shortcut
Greetings, LMH! > I added C:\cygwin\bin to the windows path. I guess I forgot environment > variables when I did the re-install. One of these days I need to learn > how to do post install config scripts so I don't have to spend two weeks > getting my windows the way I want it. If you're thorough about your backups, you can have your user environment back up in no time, using a combination of rsync for files and ERD for registry backups. -- WBR, Andrey Repin (anrdae...@freemail.ru) 23.03.2012, <17:56> Sorry for my terrible english... -- 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
Re: some kind of path problem when running bash script from windows shortcut
Yes, that fixed the issue. The script runs from the shortcut without error. Thanks for the assistance. LMH Adam Dinwoodie wrote: LMH wrote: Thanks for the advice. I just ran cygcheck, but I'm supprised that you are asking folks to post that. The output contains some personal information, such as the computer name and user name, and I'm guessing that some folks would rather not post that. You _did_ read the [problem reporting guidelines][0] before posting here, right? Like the bits that say "include that file as *an attachment*" (emphasis original) and "it is ok to redact sensitive information"? [0]: http://cygwin.com/problems.html I added C:\cygwin\bin to the windows path. I guess I forgot environment variables when I did the re-install. One of these days I need to learn how to do post install config scripts so I don't have to spend two weeks getting my windows the way I want it. So did it work? If it did, I don't really care about the cygcheck output any more. If it didn't, I need to know that to be able to help. Adam -- 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 -- 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
RE: some kind of path problem when running bash script from windows shortcut
LMH wrote: > Thanks for the advice. I just ran cygcheck, but I'm supprised that you > are asking folks to post that. The output contains some personal > information, such as the computer name and user name, and I'm guessing > that some folks would rather not post that. You _did_ read the [problem reporting guidelines][0] before posting here, right? Like the bits that say "include that file as *an attachment*" (emphasis original) and "it is ok to redact sensitive information"? [0]: http://cygwin.com/problems.html > I added C:\cygwin\bin to the windows path. I guess I forgot environment > variables when I did the re-install. One of these days I need to learn > how to do post install config scripts so I don't have to spend two weeks > getting my windows the way I want it. So did it work? If it did, I don't really care about the cygcheck output any more. If it didn't, I need to know that to be able to help. Adam -- 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
Re: some kind of path problem when running bash script from windows shortcut
Thanks for the advice. I just ran cygcheck, but I'm supprised that you are asking folks to post that. The output contains some personal information, such as the computer name and user name, and I'm guessing that some folks would rather not post that. It's a nice list of everything that is currently installed. I added C:\cygwin\bin to the windows path. I guess I forgot environment variables when I did the re-install. One of these days I need to learn how to do post install config scripts so I don't have to spend two weeks getting my windows the way I want it. The cygcheck output is below. It looks as if C:\cygwin\bin is in the path, but it was definitely not in the path environment variable. LMH Cygwin Configuration Diagnostics Current System Time: Thu Mar 22 18:40:08 2012 Windows XP Professional Ver 5.1 Build 2600 Service Pack 3 Path: C:\cygwin\usr\local\bin C:\cygwin\bin C:\WINDOWS\system32 C:\WINDOWS C:\WINDOWS\System32\Wbem C:\Program Files\Emergent 5.3.0 (32-bit)\bin Output from C:\cygwin\bin\id.exe UID: 1003(basic_user) GID: 513(None) 513(None) 544(Administrators) 545(Users) SysDir: C:\WINDOWS\system32 WinDir: C:\WINDOWS USER = 'basic_user' PWD = '/home/basic_user' HOME = '/home/basic_user' HOMEPATH = '\Documents and Settings\basic_user' MANPATH = '/usr/local/man:/usr/share/man:/usr/man::/usr/ssl/man' APPDATA = 'C:\Documents and Settings\basic_user\Application Data' HOSTNAME = 'lmh-q9550-1' SHELL = '/bin/bash' TERM = 'xterm' PROCESSOR_IDENTIFIER = 'x86 Family 6 Model 23 Stepping 10, GenuineIntel' WINDIR = 'C:\WINDOWS' OLDPWD = '/cygdrive/c/Documents and Settings/basic_user/Desktop' USERDOMAIN = 'LMH-Q9550-1' OS = 'Windows_NT' ALLUSERSPROFILE = 'C:\Documents and Settings\All Users' !:: = '::\' temp = 'C:\DOCUME~1\BASIC_~1\LOCALS~1\Temp' COMMONPROGRAMFILES = 'C:\Program Files\Common Files' TMP = '/tmp' USERNAME = 'basic_user' PROCESSOR_LEVEL = '6' FP_NO_HOST_CHECK = 'NO' SYSTEMDRIVE = 'C:' LANG = 'en_US.UTF-8' USERPROFILE = 'C:\Documents and Settings\basic_user' CLIENTNAME = 'Console' TZ = 'America/New_York' PS1 = '\[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\e[33m\]\w\[\e[0m\]\n\$ ' LOGONSERVER = '\\LMH-Q9550-1' PROCESSOR_ARCHITECTURE = 'x86' SHLVL = '1' PATHEXT = '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH' HOMEDRIVE = 'C:' COMSPEC = 'C:\WINDOWS\system32\cmd.exe' SYSTEMROOT = 'C:\WINDOWS' PRINTER = 'HP Photosmart C309a series' PROCESSOR_REVISION = '170a' INFOPATH = '/usr/local/info:/usr/share/info:/usr/info:' PROGRAMFILES = 'C:\Program Files' NUMBER_OF_PROCESSORS = '4' SESSIONNAME = 'Console' COMPUTERNAME = 'LMH-Q9550-1' _ = '/usr/bin/cygcheck' HKEY_CURRENT_USER\Software\Cygwin HKEY_CURRENT_USER\Software\Cygwin\Program Options HKEY_CURRENT_USER\Software\Cygwin\setup HKEY_LOCAL_MACHINE\SOFTWARE\Cygwin HKEY_LOCAL_MACHINE\SOFTWARE\Cygwin\Installations (default) = '\??\C:\cygwin' HKEY_LOCAL_MACHINE\SOFTWARE\Cygwin\Program Options HKEY_LOCAL_MACHINE\SOFTWARE\Cygwin\setup (default) = 'C:\cygwin' obcaseinsensitive set to 1 Cygwin installations found in the registry: System: Key: c5e39b7a9d22bafb Path: C:\cygwin a: fd N/AN/A c: hd NTFS 57231Mb 45% CP CS UN PA FC System_Volume d: hd NTFS 10001Mb 21% CP CS UN PA FC pagefile e: hd NTFS90Mb 40% CP CS UN PA FC Data_Volume f: hd NTFS943865Mb 55% CP CS UN PA FC Backup_Volume g: cd N/AN/A h: hd NTFS 53866Mb 27% CP CS UN PA FC Share o: fd N/AN/A p: fd N/AN/A q: fd N/AN/A r: fd N/AN/A z: netN/AN/A C:\cygwin/ system binary,auto C:\cygwin\bin/usr/bin system binary,auto C:\cygwin\lib/usr/lib system binary,auto cygdrive prefix /cygdrive userbinary,auto Found: C:\cygwin\bin\awk -> C:\cygwin\bin\gawk.exe Found: C:\cygwin\bin\bash.exe Found: C:\cygwin\bin\cat.exe Found: C:\cygwin\bin\cp.exe Found: C:\cygwin\bin\cpp.exe -> C:\cygwin\etc\alternatives\cpp -> C:\cygwin\bin\cpp-3.exe Found: C:\cygwin\bin\crontab.exe Found: C:\cygwin\bin\find.exe Found: C:\WINDOWS\system32\find.exe Warning: C:\cygwin\bin\find.exe hides C:\WINDOWS\system32\find.exe Found: C:\cygwin\bin\gcc.exe -> C:\cygwin\etc\alternatives\gcc -> C:\cygwin\bin\gcc-3.exe Found: C:\cygwin\bin\gdb.exe Found: C:\cygwin\bin\grep.exe Found: C:\cygwin\bin\kill.exe Found: C:\cygwin\bin\ld.exe Found: C:\cygwin\bin\ls.exe Found: C:\cygwin\bin\make.exe Found: C:\cygwin\bin\mv.exe Not Found: patch Found: C:\cygwin\bin\perl.exe Found: C:\cygwin\bin\rm.exe Found: C:\cygwin\bin\sed.exe Found: C:\cygwin\bin\ssh.exe Found: C:\cygwin\bin\sh.exe Found: C:\cygwin\bin\tar.exe Found: C:\cygwin\bin\test.exe Found: C:\cygwin\bin\vi -> C:\cygwin\bin\vim-nox.exe Found: C:\cygwin\bin\vim -> C:\cygwin\etc\alternatives\vim -> C:\cygwin\bin\vim-nox.exe 15k 2009/12/27 C:\cygwin\bin\cygattr-1.dll - os=4.0 img=1.0 sys=4.0
some kind of path problem when running bash script from windows shortcut
I have recently re-installed windows and cygwin, but my old backup script won't anymore when I run it from a windows icon. It runs fine if I cd to /usr/local/bin and run it from the command line. When I run it from the shortcut, I get "file not found" for rsync, date, unix2dos, and rm. I have temporarily changed the script to use the full path for these, /cygdrive/c/cygwin/bin/date.exe instead of date, but I have used this setup for a while and I'm not sure what has changed. Am I missing an environment variable or something? I'm not sure if the problem is in windows or cygwin. This is the version of the script that doesn't work from the shortcut, but does work from the command line. #!/bin/bash # generic backup function function backup { echo " " >> $1 echo " " >> $1 echo "* new log entry *" >> $1 date >> $logfile_path rsync -v -a -r -p -b --suffix=.back -E -t --log-file=$1 $2 $3 unix2dos $1 } logfile_path="path_to_logfile" backup_src_path="path_to_backup_src_loc" backup_destination_path="path_to_dest_loc" backup $logfile_path $backup_src_path $backup_destination_path The shortcut is set up as, Target: C:\cygwin\bin\sh.exe /usr/local/bin/backup.sh Start in: C:\cygwin\bin Any suggestions? LMH -- 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