Advertisement
Guest User

Untitled

a guest
Aug 10th, 2017
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. source=~/Android/Source/CyanogenMod/Gingerbread
  4. vendor=htc
  5. board=mecha
  6. lunch=htc_mecha-eng
  7. done=update-cm-nightly-signed.zip
  8. filepath=~/Android/Nightlies/$board
  9. version=`ls -ltr $filepath/*.zip | awk '{ print $8 }' | tail -1 | sed "s/[^0-9]//g"`
  10. newversion=`expr $version + 1`
  11. file=cm_nightly_"$board"_full_KANG-$newversion.zip
  12. hostname=""
  13. username=""
  14. password=""
  15. remotedir=
  16.  
  17. ## Commit the following out for testing:
  18. # Compile
  19. #cd $source
  20. #rm -r $source/device/$vendor/$board
  21. #sleep 5
  22. #repo sync
  23. #sleep 10
  24. #source build/envsetup.sh
  25. #lunch $lunch
  26. #sleep 5
  27. #make clean
  28. #sleep 5
  29. #make bacon -j`grep 'processor' /proc/cpuinfo | wc -l`
  30. #sleep 5
  31.  
  32. # Move and rename file
  33. mv $source/out/target/product/$board/$done $filepath/$file
  34. cd $filepath
  35. md5sum $file > $file.md5sum
  36.  
  37. # Upload file
  38. ftp -inv $hostname <<EOF
  39. user $username $password
  40. binary
  41. cd $remotedir
  42. put $file
  43. put $file.md5sum
  44. bye
  45. EOF
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement