aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xmakedist44
1 files changed, 44 insertions, 0 deletions
diff --git a/makedist b/makedist
index 9b737588..9675f7cd 100755
--- a/makedist
+++ b/makedist
@@ -75,6 +75,8 @@ out="luarocks-$1"
75rm -rf "$out" 75rm -rf "$out"
76mkdir "$out" 76mkdir "$out"
77 77
78shift
79
78git ls-files | while read i 80git ls-files | while read i
79do 81do
80 if [ -f "$i" ] 82 if [ -f "$i" ]
@@ -96,6 +98,7 @@ cd "release-unix/$out"
96rm -rf makedist install.bat win32 .travis.yml .gitignore appveyor* .appveyor 98rm -rf makedist install.bat win32 .travis.yml .gitignore appveyor* .appveyor
97cd .. 99cd ..
98tar czvpf ../"$out.tar.gz" "$out" 100tar czvpf ../"$out.tar.gz" "$out"
101rm -f ../"$out.tar.gz.asc"
99cd .. 102cd ..
100rm -rf "release-unix" 103rm -rf "release-unix"
101 104
@@ -103,5 +106,46 @@ cd "release-windows/$out-win32"
103rm -rf makedist Makefile GNUmakefile configure .travis.yml .gitignore test appveyor* .appveyor 106rm -rf makedist Makefile GNUmakefile configure .travis.yml .gitignore test appveyor* .appveyor
104cd .. 107cd ..
105zip -r ../"$out-win32.zip" "$out-win32" 108zip -r ../"$out-win32.zip" "$out-win32"
109rm -f ../"$out-win32.zip.asc"
106cd .. 110cd ..
107rm -rf "release-windows" 111rm -rf "release-windows"
112
113if [ "$1" = "binary" ]
114then
115 shift
116
117 ./configure
118
119 make binary
120 cd build-binary
121 mkdir "$out-linux-x86_64"
122 cp luarocks.exe "$out-linux-x86_64/luarocks"
123 cp luarocks-admin.exe "$out-linux-x86_64/luarocks-admin"
124 zip "../$out-linux-x86_64.zip" "$out-linux-x86_64"/*
125 cd ..
126 rm -f "$out-linux-x86_64.zip.asc"
127
128 make windows-binary
129 cd build-windows-binary
130 mkdir "$out-windows-32"
131 cp luarocks.exe "$out-windows-32/luarocks.exe"
132 cp luarocks-admin.exe "$out-windows-32/luarocks-admin.exe"
133 zip "../$out-windows-32.zip" "$out-windows-32"/*
134 cd ..
135 rm -f "$out-windows-32.zip.asc"
136
137fi
138
139if [ "$1" = "sign" ]
140then
141 shift
142
143 for f in \
144 $out-windows-32.zip \
145 $out-linux-x86_64.zip \
146 $out-win32.zip \
147 $out.tar.gz
148 do
149 [ -e "$f" -a ! -e "$f.asc" ] && gpg --armor --output "$f.asc" --detach-sign "$f"
150 done
151fi