Browse Source

Add bundling script -- WIP

Théophile Bastian 1 year ago
parent
commit
e4695da0e9
2 changed files with 32 additions and 0 deletions
  1. 2 0
      .gitignore
  2. 30 0
      bundle.sh

+ 2 - 0
.gitignore

@@ -0,0 +1,2 @@
+dwarf-compilation.tar.gz
+dwarf-compilation

+ 30 - 0
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