From 53e74cf918ef0cb754f33364c716816af3a9ce3b Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Wed, 21 Oct 2015 16:54:11 +0200 Subject: Added support for building zip files for uploading --- .gitignore | 2 ++ gup/Gupfile | 4 +++- gup/abgabe.gup | 3 +++ shell.nix | 5 ++++- 4 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 gup/abgabe.gup diff --git a/.gitignore b/.gitignore index 8a39c40..4b57565 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ **/.gup **/*.pdf +**/*.class +**/abgabe.zip diff --git a/gup/Gupfile b/gup/Gupfile index 159f942..5d89a6a 100644 --- a/gup/Gupfile +++ b/gup/Gupfile @@ -1,2 +1,4 @@ pdf.gup: - **/*.pdf \ No newline at end of file + **/*.pdf +abgabe.gup: + **/abgabe.zip \ No newline at end of file diff --git a/gup/abgabe.gup b/gup/abgabe.gup new file mode 100644 index 0000000..3a61c7e --- /dev/null +++ b/gup/abgabe.gup @@ -0,0 +1,3 @@ +#!/usr/bin/env zsh + +awk -v "base=$(dirname $2)" '{ print base "/" $0; }' $(dirname $2)/manifest | xargs -t -d '\n' -- zip -j $2 diff --git a/shell.nix b/shell.nix index e9b016a..a737e97 100644 --- a/shell.nix +++ b/shell.nix @@ -3,5 +3,8 @@ pkgs.stdenv.mkDerivation { name = "uni-env"; - buildInputs = [ pkgs.haskellPackages.pandoc pkgs.gup ]; + buildInputs = [ pkgs.haskellPackages.pandoc + pkgs.gup + pkgs.zip + ]; } -- cgit v1.2.3