-1

I'm working on some legacy software and need to build manually every time. How can I automate the following steps within a shell script?:

clearmake clean
clearmake
clearmake package
scp /path/to/package user@remotehost:path
password: 

Also, how to make clearmake faster? Should I change the type of encryption on the remote host or is there any other way to do it?

Alan
  • 1,479
  • 3
  • 20
  • 36
  • 1
    What you want automate over the `bash mymake`.? (the `mymake` is the above script). Maybe `chmod 755 mymake` and `./mymake`? Use the [ssh-keygen](https://help.github.com/articles/generating-ssh-keys/) to allow you using ssh without entering passwords every time. – clt60 Mar 02 '15 at 14:23

1 Answers1

1

To automate a series of commands with a script, you can place the commands in a text file. This file can be given execute privileges with the chmod command. If the problem is that your scp command needs to pass a password. Look at this question.

Community
  • 1
  • 1
Matt
  • 5,404
  • 3
  • 27
  • 39
  • expect solved this issue, thanks. Also, commands over ssh are passed as arguments. " ssh user@host 'cmd 1; cmd2' ". – Alan Mar 03 '15 at 08:39