remove the parentheses? maybe???

This commit is contained in:
askiiart 2025-03-11 21:51:03 -05:00
parent cd2625cbc4
commit c6cf9cdd7f
Signed by untrusted user who does not match committer: askiiart
GPG key ID: 6A32977DAF31746A

10
run.sh
View file

@ -5,14 +5,14 @@ program_name="librewolf-allow-dark"
built_dir=${COMPILED_DIR:-/compiled}/$program_name
version=$(cat $built_dir/version)
version=$(echo $version | sed 's/-/./g')
version_no_dash=$(echo $version | sed 's/-/./g')
repo_dir=${REPO_DIR:-/repo}
# skip if already up-to-date
# TODO: use the repo instead and check the version with dnf
# yeah this is bad; see also the librewolf-allow-dark-aaaaaa thing below
touch $repo_dir/$program_name-tmp
if $(ls $repo_dir/$program_name-* | grep -q "$version"); then
if $(ls $repo_dir/$program_name-* | grep -q "$version_no_dash"); then
rm $repo_dir/$program_name-tmp
echo "package is already up to date, exiting"
exit
@ -23,11 +23,11 @@ rm $repo_dir/$program_name-tmp
dnf install fedora-packager rpmdevtools createrepo_c -y
rpmdev-setuptree
sed -i "s/Version:.*/Version: $version/g" $program_name.spec
sed -i "s/Version:.*/Version: $version_no_dash/g" $program_name.spec
# build package and move to the repo
rpmbuild -bb $program_name.spec
mv ~/rpmbuild/RPMS/x86_64/$program_name-$version-* $repo_dir/
mv ~/rpmbuild/RPMS/x86_64/$program_name-$version_no_dash-* $repo_dir/
# remove old versions
cd $repo_dir
@ -40,5 +40,5 @@ rm $program_name-0.rpm || true
# update repo
createrepo_c .
cd $repo_dir/
cd $repo_dir
echo "package is at $repo_dir/$(ls $program_name-*.rpm)"