File tree 2 files changed +26
-2
lines changed
2 files changed +26
-2
lines changed Original file line number Diff line number Diff line change 1
- #! /bin/bash
1
+ #!/usr/bin/env python
2
+ # conda-build requires all scripts to have a python shebang.
3
+ # see https://github.com/conda/conda-build/blob/6921f067a/conda_build/noarch_python.py#L36-L38
2
4
5
+ def run (script ):
6
+ import sys , tempfile , subprocess
7
+ file = tempfile .NamedTemporaryFile (mode = 'w+t' , suffix = 'sh' )
8
+ file .write (script )
9
+ file .flush ()
10
+ subprocess .run (["/bin/bash" , file .name ] + sys .argv [1 :])
11
+ file .close ()
12
+
13
+ run ("""
3
14
# exit on error
4
15
set -e
5
16
# print commands
72
83
echo ""
73
84
echo "To flash everything, do not use any of the -b|-B|-r option."
74
85
echo ""
75
- echo " usage: $0 [-b] [-B] [-r] [-h] [-m nist_qc1|nist_qc2] [-t kc705|pipistrello] [-d path] [-f path]"
86
+ echo "usage: artiq_flash.sh [-b] [-B] [-r] [-h] [-m nist_qc1|nist_qc2] [-t kc705|pipistrello] [-d path] [-f path]"
76
87
echo "-b Flash bitstream"
77
88
echo "-B Flash BIOS"
78
89
echo "-r Flash ARTIQ runtime"
193
204
fi
194
205
echo "Done."
195
206
xc3sprog -v -c $CABLE -R > /dev/null 2>&1
207
+ """ )
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
+ ARTIQ_PREFIX=$PREFIX /lib/python3.5/site-packages/artiq
4
+
3
5
$PYTHON setup.py install --single-version-externally-managed --record=record.txt
6
+
7
+ # install scripts
8
+
9
+ cp artiq/frontend/artiq_flash.sh $PREFIX /bin
10
+
11
+ # install udev rules
12
+
13
+ mkdir -p $ARTIQ_PREFIX /misc
14
+ cp misc/99-papilio.rules $ARTIQ_PREFIX /misc/
15
+ cp misc/99-kc705.rules $ARTIQ_PREFIX /misc/
You can’t perform that action at this time.
0 commit comments