I am trying to write a script that will:
- Copy files to a server (I already have a script
copy.shthat does this task)
- ssh to that server
- cd to the directory where the files I just copied are
- copy the resulting binary from
maketo another location.
My script looks like this:
#!/usr/bin/bash BUILDSERV=me@server BUILDDIR=/me/directory #run my script that copies the files ./copy.sh #TARGET is also a var in copy.sh so I make sure it's set properly here TARGET=root@final_dest:/usr/bin/my_bin ssh $BUILDSERV "cd $BUILDDIR && make && scp ./my_bin $TARGET"
The issue is that a program I want to run as part of
make is not in my
.bash_profile has a
export PATH=$PATH:/my/bin/ line, but it seems that
bash_profile is not being read when I ssh in.
Is there a way to change my ssh invocation or script in general to make it read my