Guest User

Untitled

a guest
Aug 17th, 2018
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. #!/usr/bin/env bash
  2. # original gist from pescobar/build-git.sh
  3. # changes by LaggAt:
  4. # * to be usable on Raspbian / tested RPi3 and
  5. # * for automatic depency resolving
  6.  
  7. # Clear out all previous attempts
  8. rm -rf "/tmp/source-git/"
  9.  
  10. # Get the dependencies for git, then get openssl
  11. sudo apt-get update
  12. sudo apt-get install build-essential fakeroot dpkg-dev -y
  13. sudo apt-get build-dep git -y
  14. sudo apt-get install libcurl4-openssl-dev -y
  15. mkdir -p "/tmp/source-git/"
  16. cd "/tmp/source-git/"
  17. apt-get source git
  18.  
  19. # We need to actually go into the git source directory
  20. # find -type f -name "*.dsc" -exec dpkg-source -x \{\} \;
  21. cd $(find -mindepth 1 -maxdepth 1 -type d -name "git-*")
  22. pwd
  23.  
  24. # This is where we actually change the library from one type to the other.
  25. sed -i -- 's/libcurl4-gnutls-dev/libcurl4-openssl-dev/' ./debian/control
  26. # Compile time, itself, is long. Skips the tests. Do so at your own peril.
  27. sed -i -- '/TEST\s*=\s*test/d' ./debian/rules
  28.  
  29. # Build it.
  30. dpkg-buildpackage -rfakeroot -b
  31.  
  32. # Install (only git, git-man)
  33. cd ..
  34. sudo apt -y --allow-downgrades install ./git-man_*.deb ./git_*.deb
Add Comment
Please, Sign In to add comment