Mercurial > hg > hg-fastimport
annotate hgext3rd/fastimport/vendor/import-python-fastimport.sh @ 85:1f5544a8870b
Add a script to import python-fastimport to our liking
| author | Roy Marples <roy@marples.name> |
|---|---|
| date | Tue, 19 Jan 2021 22:53:29 +0000 |
| parents | |
| children |
| rev | line source |
|---|---|
|
85
1f5544a8870b
Add a script to import python-fastimport to our liking
Roy Marples <roy@marples.name>
parents:
diff
changeset
|
1 #!/bin/sh |
|
1f5544a8870b
Add a script to import python-fastimport to our liking
Roy Marples <roy@marples.name>
parents:
diff
changeset
|
2 # Cleanup the python-fastimport sources to our liking |
|
1f5544a8870b
Add a script to import python-fastimport to our liking
Roy Marples <roy@marples.name>
parents:
diff
changeset
|
3 |
|
1f5544a8870b
Add a script to import python-fastimport to our liking
Roy Marples <roy@marples.name>
parents:
diff
changeset
|
4 # NOTE: The home page is https://github.com/jelmer/python-fastimport |
|
1f5544a8870b
Add a script to import python-fastimport to our liking
Roy Marples <roy@marples.name>
parents:
diff
changeset
|
5 # But the upstream release is called fastimport. |
|
1f5544a8870b
Add a script to import python-fastimport to our liking
Roy Marples <roy@marples.name>
parents:
diff
changeset
|
6 # As such there are confusing names. |
|
1f5544a8870b
Add a script to import python-fastimport to our liking
Roy Marples <roy@marples.name>
parents:
diff
changeset
|
7 # This script will attempt to rename both to python_fastimport to |
|
1f5544a8870b
Add a script to import python-fastimport to our liking
Roy Marples <roy@marples.name>
parents:
diff
changeset
|
8 # reflect the vendor and satisfy a module name a dash is not allowed. |
|
1f5544a8870b
Add a script to import python-fastimport to our liking
Roy Marples <roy@marples.name>
parents:
diff
changeset
|
9 |
|
1f5544a8870b
Add a script to import python-fastimport to our liking
Roy Marples <roy@marples.name>
parents:
diff
changeset
|
10 # untar the distribution here, for example |
|
1f5544a8870b
Add a script to import python-fastimport to our liking
Roy Marples <roy@marples.name>
parents:
diff
changeset
|
11 # tar xvjpf python-fastimport-0.9.8.tar.gz |
|
1f5544a8870b
Add a script to import python-fastimport to our liking
Roy Marples <roy@marples.name>
parents:
diff
changeset
|
12 |
|
1f5544a8870b
Add a script to import python-fastimport to our liking
Roy Marples <roy@marples.name>
parents:
diff
changeset
|
13 set -xe |
|
1f5544a8870b
Add a script to import python-fastimport to our liking
Roy Marples <roy@marples.name>
parents:
diff
changeset
|
14 rm -rf python_fastimport_tmp |
|
1f5544a8870b
Add a script to import python-fastimport to our liking
Roy Marples <roy@marples.name>
parents:
diff
changeset
|
15 if [ -d python-fastimport-* ]; then |
|
1f5544a8870b
Add a script to import python-fastimport to our liking
Roy Marples <roy@marples.name>
parents:
diff
changeset
|
16 mv python-fastimport* python_fastimport_tmp |
|
1f5544a8870b
Add a script to import python-fastimport to our liking
Roy Marples <roy@marples.name>
parents:
diff
changeset
|
17 elif [ -d fastimport-* ]; then |
|
1f5544a8870b
Add a script to import python-fastimport to our liking
Roy Marples <roy@marples.name>
parents:
diff
changeset
|
18 mv fastimport-* python_fastimport_tmp |
|
1f5544a8870b
Add a script to import python-fastimport to our liking
Roy Marples <roy@marples.name>
parents:
diff
changeset
|
19 else |
|
1f5544a8870b
Add a script to import python-fastimport to our liking
Roy Marples <roy@marples.name>
parents:
diff
changeset
|
20 echo "No idea how to import!" >2 |
|
1f5544a8870b
Add a script to import python-fastimport to our liking
Roy Marples <roy@marples.name>
parents:
diff
changeset
|
21 exit 1 |
|
1f5544a8870b
Add a script to import python-fastimport to our liking
Roy Marples <roy@marples.name>
parents:
diff
changeset
|
22 fi |
|
1f5544a8870b
Add a script to import python-fastimport to our liking
Roy Marples <roy@marples.name>
parents:
diff
changeset
|
23 |
|
1f5544a8870b
Add a script to import python-fastimport to our liking
Roy Marples <roy@marples.name>
parents:
diff
changeset
|
24 find python_fastimport_tmp -mindepth 1 ! -name AUTHORS ! -name COPYING \ |
|
1f5544a8870b
Add a script to import python-fastimport to our liking
Roy Marples <roy@marples.name>
parents:
diff
changeset
|
25 ! -name NEWS ! -name README.md \ |
|
1f5544a8870b
Add a script to import python-fastimport to our liking
Roy Marples <roy@marples.name>
parents:
diff
changeset
|
26 ! -regex '^python_fastimport_tmp/fastimport\(.*\)' \ |
|
1f5544a8870b
Add a script to import python-fastimport to our liking
Roy Marples <roy@marples.name>
parents:
diff
changeset
|
27 -delete |
|
1f5544a8870b
Add a script to import python-fastimport to our liking
Roy Marples <roy@marples.name>
parents:
diff
changeset
|
28 mv python_fastimport_tmp/fastimport/* python_fastimport_tmp/ |
|
1f5544a8870b
Add a script to import python-fastimport to our liking
Roy Marples <roy@marples.name>
parents:
diff
changeset
|
29 rmdir python_fastimport_tmp/fastimport |
|
1f5544a8870b
Add a script to import python-fastimport to our liking
Roy Marples <roy@marples.name>
parents:
diff
changeset
|
30 |
|
1f5544a8870b
Add a script to import python-fastimport to our liking
Roy Marples <roy@marples.name>
parents:
diff
changeset
|
31 rm -rf python_fastimport |
|
1f5544a8870b
Add a script to import python-fastimport to our liking
Roy Marples <roy@marples.name>
parents:
diff
changeset
|
32 mv python_fastimport_tmp python_fastimport |
