Springerle / dh-virtualenv-mold

:cookie: A cookiecutter template to add easy Debianization to any existing Python project.
Apache License 2.0
25 stars 7 forks source link

Error while runing test.sh script #2

Closed ghost closed 9 years ago

ghost commented 9 years ago

Hi,

Is the 'test.sh' script intended to be run as is ?

I tried to run it and face the error below ./test.sh cp: cannot stat ‘/home/foobar/tmptest/cookiecutter.’: No such file or directory

Seems to be caused by this line <-- cp -rp "$rootdir/"cookiecutter. "$workdir" --> because $rootdir is always empty

jhermann commented 9 years ago

All I can say to that is "works here on Trusty". Use bash -x test.sh and paste the output properly escaped (i.e. in a ``` section), unless you then spot the error yourself. Also provide info about your environment.

ghost commented 9 years ago
+ set -e
+ deactivate
+ :
+++ dirname ./test.sh
++ cd .
++ pwd
+ rootdir=/home/jerome/garbage/toto
+ workdir=/tmp/dhvtst-jerome
+ rm -rf /tmp/dhvtst-jerome
+ mkdir -p /tmp/dhvtst-jerome
+ cd /tmp/dhvtst-jerome
+ ensure_tool dh_virtualenv
+ local tool=dh_virtualenv
+ command which dh_virtualenv
+ ensure_tool cookiecutter
+ local tool=cookiecutter
+ command which cookiecutter
++ dh_virtualenv --version
++ cut -f2 '-d '
+ python -c 'assert ('\''0'\'','\''8'\'') <= tuple('\''0.9'\''.split('\''.'\'')), '\''You need dh_virtualenv 0.8+'\'''
+ prjname=dhvtst
+ rm -rf '/tmp/dhvtst-jerome/*cookiecutter*'
+ test '!' -d dhvtst
+ git clone https://github.com/borntyping/cookiecutter-pypackage-minimal.git
Cloning into 'cookiecutter-pypackage-minimal'...
remote: Counting objects: 46, done.
Unpacking objects: 100% (46/46), done.
remote: Total 46 (delta 0), reused 0 (delta 0), pack-reused 46
Checking connectivity... done.
+ sed -r -i -e s/cookiecutter-pypackage-minimal/dhvtst/ /tmp/dhvtst-jerome/cookiecutter-pypackage-minimal/cookiecutter.json
+ cookiecutter --no-input cookiecutter-pypackage-minimal/
+ echo

+ cp -rp '/home/jerome/garbage/toto/*cookiecutter.*' /tmp/dhvtst-jerome
cp: cannot stat ‘/home/jerome/garbage/toto/*cookiecutter.*’: No such file or directory

Debian GNU/Linux unstable (sid) Python 2.7.10 GNU bash, version 4.3.33(1)-release (x86_64-pc-linux-gnu)

jhermann commented 9 years ago

Then you did not clone the workdir of this repo correctly, or have strange glob (shopt) bash settings or similar. After all, *cookiecutter.* has two hits in this repo, and you have none, i.e. paths are missing.

ghost commented 9 years ago

Ok my mistake: I ran 'test.sh' as standalone script without cloning the whole repo. Thanks for your help.

ghost commented 9 years ago

Hi, typo in the "503e94869fef0bcba38089873f883bbb8f459323" commit => "README.mdd"