Created
December 8, 2024 15:23
-
-
Save novogrammer/580ac2c6c17b02c93cdf5b28bc580906 to your computer and use it in GitHub Desktop.
windows用のzipファイルを作る
This file contains hidden or 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
| #!/usr/bin/env bash | |
| if [ -z "$1" ]; then | |
| echo "Usage: $0 <target-directory-or-file>" | |
| exit 1 | |
| fi | |
| TARGET="$1" | |
| # 7zzコマンドを使用してWindows互換性の高いzipを作成 | |
| # -tzip : ZIP形式での圧縮 | |
| # -scsWIN: Windows向けの文字コードセット | |
| 7zz a -tzip -scsWIN "${TARGET}.zip" "${TARGET}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment