This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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.


# 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

backup $logfile_path  $backup_src_path  $backup_destination_path

The shortcut is set up as,
Target: C:\cygwin\bin\sh.exe /usr/local/bin/
Start in: C:\cygwin\bin

Any suggestions?


Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]