comparison 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
comparison
equal deleted inserted replaced
84:34bdd4f7773a 85:1f5544a8870b
1 #!/bin/sh
2 # Cleanup the python-fastimport sources to our liking
3
4 # NOTE: The home page is https://github.com/jelmer/python-fastimport
5 # But the upstream release is called fastimport.
6 # As such there are confusing names.
7 # This script will attempt to rename both to python_fastimport to
8 # reflect the vendor and satisfy a module name a dash is not allowed.
9
10 # untar the distribution here, for example
11 # tar xvjpf python-fastimport-0.9.8.tar.gz
12
13 set -xe
14 rm -rf python_fastimport_tmp
15 if [ -d python-fastimport-* ]; then
16 mv python-fastimport* python_fastimport_tmp
17 elif [ -d fastimport-* ]; then
18 mv fastimport-* python_fastimport_tmp
19 else
20 echo "No idea how to import!" >2
21 exit 1
22 fi
23
24 find python_fastimport_tmp -mindepth 1 ! -name AUTHORS ! -name COPYING \
25 ! -name NEWS ! -name README.md \
26 ! -regex '^python_fastimport_tmp/fastimport\(.*\)' \
27 -delete
28 mv python_fastimport_tmp/fastimport/* python_fastimport_tmp/
29 rmdir python_fastimport_tmp/fastimport
30
31 rm -rf python_fastimport
32 mv python_fastimport_tmp python_fastimport