Improve script to build packages to name the package with the OS name

This commit is contained in:
Francesco Abbate 2020-07-30 14:25:21 +02:00
parent b484cb8bd3
commit abad5cce0f
1 changed files with 10 additions and 7 deletions

View File

@ -46,14 +46,15 @@ lite_build_package_windows () {
build="$1" build="$1"
version="$2" version="$2"
arch="$3" arch="$3"
local pdir=".package-build/lite-xl-$version-$arch" os="win"
local pdir=".package-build/lite-xl"
mkdir -p "$pdir" mkdir -p "$pdir"
copy_directory_from_repo data "$pdir" copy_directory_from_repo data "$pdir"
cp "$build/src/lite.exe" "$pdir" cp "$build/src/lite.exe" "$pdir"
strip --strip-all "$pdir/lite.exe" strip --strip-all "$pdir/lite.exe"
pushd ".package-build" pushd ".package-build"
local package_name="lite-xl-$version-$arch.zip" local package_name="lite-xl-$version-$os-$arch.zip"
zip "$package_name" -r "lite-xl-$version-$arch" zip "$package_name" -r "lite-xl"
mv "$package_name" .. mv "$package_name" ..
popd popd
rm -fr ".package-build" rm -fr ".package-build"
@ -64,13 +65,14 @@ lite_build_package_macosx () {
build="$1" build="$1"
version="$2" version="$2"
arch="$3" arch="$3"
os="macosx"
local pdir=".package-build/lite-xl.app/Contents/MacOS" local pdir=".package-build/lite-xl.app/Contents/MacOS"
mkdir -p "$pdir" mkdir -p "$pdir"
copy_directory_from_repo data "$pdir" copy_directory_from_repo data "$pdir"
cp "$build/src/lite" "$pdir" cp "$build/src/lite" "$pdir"
strip "$pdir/lite" strip "$pdir/lite"
pushd ".package-build" pushd ".package-build"
local package_name="lite-xl-$version-$arch.zip" local package_name="lite-xl-$version-$os-$arch.zip"
zip "$package_name" -r "lite-xl.app" zip "$package_name" -r "lite-xl.app"
mv "$package_name" .. mv "$package_name" ..
popd popd
@ -82,14 +84,15 @@ lite_build_package_linux () {
build="$1" build="$1"
version="$2" version="$2"
arch="$3" arch="$3"
local pdir=".package-build/lite-xl-$version-$arch" os="linux"
local pdir=".package-build/lite-xl"
mkdir -p "$pdir" mkdir -p "$pdir"
copy_directory_from_repo data "$pdir" copy_directory_from_repo data "$pdir"
cp "$build/src/lite" "$pdir" cp "$build/src/lite" "$pdir"
strip "$pdir/lite" strip "$pdir/lite"
pushd ".package-build" pushd ".package-build"
local package_name="lite-xl-$version-$arch.tar.gz" local package_name="lite-xl-$version-$os-$arch.tar.gz"
tar czf "$package_name" "lite-xl-$version-$arch" tar czf "$package_name" "lite-xl"
mv "$package_name" .. mv "$package_name" ..
popd popd
rm -fr ".package-build" rm -fr ".package-build"