Last active
June 3, 2021 05:51
-
-
Save amane-katagiri/66a8ef1770103f878f9b09e4415a2a37 to your computer and use it in GitHub Desktop.
同じファイル群に対して同じバイナリのアーカイブを生成する
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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