From e4695da0e9ef98d5b6788a2c83b29be0ec1ed03c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9ophile=20Bastian?= Date: Tue, 23 Oct 2018 14:57:34 +0200 Subject: [PATCH] Add bundling script -- WIP --- .gitignore | 2 ++ bundle.sh | 30 ++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 .gitignore create mode 100755 bundle.sh diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ad9a796 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +dwarf-compilation.tar.gz +dwarf-compilation diff --git a/bundle.sh b/bundle.sh new file mode 100755 index 0000000..95c062a --- /dev/null +++ b/bundle.sh @@ -0,0 +1,30 @@ +#!/bin/bash +## Generates the bundle + +function copy_dir { + rm -rf dwarf-compilation + cp -r dwarf-compilation.base dwarf-compilation +} + +function download_repo { + echo -n "Downloading $1… " + wget -q "https://git.tobast.fr/m2-internship/$1/archive/master.tar.gz" + tar xzf master.tar.gz + rm -f master.tar.gz + echo "OK" +} + +function download { + cd dwarf-compilation + download_repo "dwarf-assembly" + download_repo "libunwind-eh_elf" + cd .. +} + +function package { + tar czf dwarf-compilation.tar.gz dwarf-compilation +} + +copy_dir +download +package