startup.bash 875 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. set -e
  2. # cd /root/temp/svn/Publish/DevOps/github-bash;bash startup.bash;
  3. #---------------------------------------------------------------------
  4. #(x.1)参数
  5. args_="
  6. export name=Sers
  7. export export GIT_SSH_SECRET=xxxxxx
  8. # "
  9. #----------------------------------------------
  10. #(x.2)当前路径
  11. curPath=$PWD
  12. cd $curPath/../../..
  13. export basePath=$PWD
  14. cd $curPath
  15. # export basePath=/root/temp/svn
  16. #----------------------------------------------
  17. echo "(x.3)get version"
  18. export version=`grep '<Version>' $(grep '<pack>\|<publish>' ${basePath} -r --include *.csproj -l | head -n 1) | grep -oP '>(.*)<' | tr -d '<>'`
  19. echo $version
  20. #----------------------------------------------
  21. #(x.4)bash
  22. for file in *.sh
  23. do
  24. echo %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  25. echo "[$(date "+%H:%M:%S")]" bash $file
  26. bash $file
  27. done