made bash script to automate entire process