element-desktop/scripts/mkrepo.sh

33 lines
571 B
Bash
Raw Permalink Normal View History

2019-12-13 16:14:33 +00:00
#!/bin/sh
# Take the deb and bundle it into a apt repository
if [[ $# -lt 1 ]]
then
echo "Usage $0 <config dir>"
exit
fi
confdir=$1
2019-12-13 16:46:29 +00:00
set -ex
2019-12-13 16:14:33 +00:00
2019-12-13 17:21:24 +00:00
ver=`jq -r .version package.json`
2019-12-13 16:14:33 +00:00
distdir=$PWD/dist
confdir=$PWD/$confdir
repodir=`mktemp -d -t repo`
mkdir $repodir/conf
cp $confdir/conf_distributions $repodir/conf/distributions
pushd $repodir
for i in `cat conf/distributions | grep Codename | cut -d ' ' -f 2`
do
reprepro includedeb $i $distdir/element-desktop_${ver}_amd64.deb
2019-12-13 16:14:33 +00:00
done
tar cvzf $distdir/element-desktop_repo_$ver.tar.gz .
2019-12-13 16:14:33 +00:00
popd
rm -r $repodir