This is scripting task based on the Bash Scripting :
- There are two folders to be synced.
- These folders are git repositories. Consider these two repository folders are folder A and folder B.
- We want to run a script in folder
a once a week
. - The script should be able to identify the files in folder A and all its subdirectories that are
tracked in git
. - Untracked files should be ignored. And then the script should copy those files to folder B
(only the tracked files)
. - It should create the
same folder structure
in folder B. - The script should display a summary of files copied in the terminal.
- Both are local repositories.
- Now, it is copying all the files irrespective of whether there are differences or not.
- We would like the script to check whether there is a similar file in the same location in the destination directory.
- And if there is a file, the script should check whether the new file is different from the original.
- And copy only if the new one is different.
- And then, the other improvement is this.
- After copying all the files, it should go to the destination folder (folder B).
- Check whether there is any file that is not in the previous folder (folder A) and remove them.
- This time, we need to create a script to run several other scripts.
- The specialty is that, it should be able to run those scripts
one after the other
. - It should wait u til the first script is complete to start the next.
- Now, we want to add to the real script.
- It has makefile commands also.
cd A
./asmsim_regression.sh
./asmsystem_regression.sh
cd ../B/C
make alltests
cd ../../D/
make desgen
make desgenhw
cd C
./runtests
cd ../E
./runhwtests
- All these should be run one by one.
A
folder has two .sh files to be run one after the other.- When those are complete, the script should move the execution to
B/C
folder and run a command from a makefile - Once that is complete, the script should go to
D
folder and run two make commands. - Then it should go to
E
folder and run another script there. - After that script is complete, it should go to
E
folder and run another script there. - That is the task of this script. Each script will take some time to run.
Bash |
Ubuntu |
Git |
GitHub |
GitLab |
Don't forget to leave feedback if you find this repo useful or any improvements. βπΉπ₯§
Thank you π§‘