Skip to content

Commit e1ec008

Browse files
committed
add task to perform the download of dfu-util and remove the old bash scripts
1 parent c355a87 commit e1ec008

File tree

3 files changed

+20
-21
lines changed

3 files changed

+20
-21
lines changed

Taskfile.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,23 @@ vars:
2626
-X {{.CONFIGURATION_PACKAGE}}.Commit={{.COMMIT}}
2727
-X {{.CONFIGURATION_PACKAGE}}.Timestamp={{.TIMESTAMP}}
2828
'
29-
tasks: {}
29+
DFU_UTIL_VERSION: dfu-util-0.11
30+
31+
tasks:
32+
download-dfu-util:
33+
desc: download dfu-util and copy the files in the correct dir
34+
cmds:
35+
- |
36+
if [ -d "{{.DFU_UTIL_VERSION}}" ];
37+
then
38+
echo "{{.DFU_UTIL_VERSION}} already downloaded (directory exists)."
39+
else
40+
echo "Downloading {{.DFU_UTIL_VERSION}}..."
41+
curl https://dfu-util.sourceforge.net/releases/{{.DFU_UTIL_VERSION}}.tar.gz -s | tar xz
42+
43+
cp {{.DFU_UTIL_VERSION}}/src/dfuse_mem.c dfu-util_dfuse_mem.c
44+
cp {{.DFU_UTIL_VERSION}}/src/dfu_util.c dfu-util_dfu_util.c
45+
cp {{.DFU_UTIL_VERSION}}/src/quirks.c dfu-util_quirks.c
46+
# for some reason quirks.c has the exec flag set
47+
chmod -x dfu-util_quirks.c
48+
fi

compile.sh

Lines changed: 0 additions & 15 deletions
This file was deleted.

compile_mac_m1.sh

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)