Zrythm installer
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

61 lines
1.5 KiB

#!@BASH@
#
# Copyright (C) 2020-2021 Alexandros Theodotou <alex at zrythm dot org>
#
# This file is part of Zrythm
#
# Zrythm is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Zrythm is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with Zrythm. If not, see <https://www.gnu.org/licenses/>.
set -e
out_pkg="$1"
deb_source_tarball=$2
deb_changelog=$3
deb_rules=$4
deb_compat=$5
deb_control=$6
deb_copyright=$7
private_dir="$8"
inner_dir="@ZRYTHM_INNER_DIR_NAME@"
dash_trial="@DASH_TRIAL@"
rm -rf "$private_dir"
mkdir -p "$private_dir"
deb_parent_dir=$private_dir/$inner_dir
deb_dir="$deb_parent_dir/debian"
deb_src_dir="$deb_dir/source"
mkdir -p $deb_parent_dir
mkdir -p $deb_src_dir
# prepare
cp $deb_source_tarball $private_dir/
cp $deb_changelog $deb_dir/changelog
cp $deb_compat $deb_dir/compat
cp $deb_control $deb_dir/control
cp $deb_copyright $deb_dir/copyright
cp $deb_rules $deb_dir/rules
echo "3.0 (native)" > $deb_src_dir/format
# add tarball contents
tar -xzf $deb_source_tarball -C $private_dir
pushd $deb_parent_dir
debuild -us -uc
popd
mv "$private_dir/zrythm$dash_trial"_*.deb "$out_pkg"