Advertisement
Guest User

Untitled

a guest
May 29th, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. releaseName=`date '+%Y%m%d'`
  2. oldRelease=`cat {project name}/SupportFiles/Info.plist | sed -n '/CFBundleVersion/{n;p;}' | cut -d '>' -f2 | cut -d '<' -f1`
  3. oldTemp=${oldRelease:0:8}
  4. if [ $oldTemp == $releaseName ]
  5. then
  6. suffix=${oldRelease:8}
  7. suffix=$(($suffix + 1))
  8. printf -v suffix "%02d" $suffix
  9. else
  10. suffix=01
  11. fi
  12. CFVersion=$releaseName$suffix
  13. echo $CFVersion
  14. cat {project name}/SupportFiles/Info.plist | sed -n '/CFBundleVersion/{p;n;s/>.*</>'$CFVersion'</;};p' > temp.plist
  15. mv temp.plist {project name}/SupportFiles/Info.plist
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement