File: git-export.sh

package info (click to toggle)
libgoby-java 3.3.1%2Bdfsg2-9
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 58,104 kB
  • sloc: java: 78,105; cpp: 5,011; xml: 3,170; python: 2,108; sh: 1,575; ansic: 277; makefile: 114
file content (8 lines) | stat: -rwxr-xr-x 238 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
#!/bin/bash
revision=$1
destination_directory=$2

# Export the content of the current Git repository at ${revision}  to the  ${destination_directory}
git checkout  ${revision}

git archive ${revision} | tar -x -C ${destination_directory}