Separate platform-specific installers

This commit is contained in:
2020-01-20 15:50:43 +09:00
parent 4e3c5d7202
commit 3ed1513ea3
12 changed files with 100 additions and 197 deletions
+15 -21
View File
@@ -1,22 +1,16 @@
#! /usr/bin/env escript
#! /bin/bash
-mode(compile).
main(_) ->
{ok, BV} = file:read_file("zomp/etc/version.txt"),
Version = string:strip(binary_to_list(BV), both, $\n),
Inner = "zomp.zip",
Outer = "zx-" ++ Version ++ ".zip",
{ok, Inner} = zip:create(Inner, ["zomp"]),
Files =
["install.escript",
"install_unix",
"uninstall_unix",
"README.md",
"README.install",
"LICENSE",
Inner],
{ok, Outer} = zip:create(Outer, Files),
ok = file:delete(Inner),
ok = io:format("~ts~n", [Outer]),
halt(0).
version=$(head -n1 zomp/etc/version.txt)
name=zx-"$version"
archive_gz="$name".tar.gz
archive_xz="$name".tar.xz
tmpdir=$(mktemp -d)
zxtmp="$tmpdir"/"$name"
mkdir "$zxtmp"
cp -r zomp "$zxtmp"
cp -r unix "$zxtmp"
cp install uninstall README.md LICENSE "$zxtmp"
tar -C "$tmpdir" -zcf "$PWD/$archive_gz" "$name"
tar -C "$tmpdir" -Jcf "$PWD/$archive_xz" "$name"
rm -rf "$tmpdir"
echo "$archive_xz"