Skip to content

Instantly share code, notes, and snippets.

@amane-katagiri
Last active June 3, 2021 05:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amane-katagiri/66a8ef1770103f878f9b09e4415a2a37 to your computer and use it in GitHub Desktop.
Save amane-katagiri/66a8ef1770103f878f9b09e4415a2a37 to your computer and use it in GitHub Desktop.
同じファイル群に対して同じバイナリのアーカイブを生成する
#!/bin/sh
ARCHIVE="$1"
TARGET="$2"
find "$TARGET" -exec touch -t 198001010000 '{}' +
find "$TARGET" -print0 | tr '\0' '\n' | LC_ALL=C sort | zip -@ -X "$ARCHIVE"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment