From 6267101eaf653405545976a6a7ce565174bd65a7 Mon Sep 17 00:00:00 2001 From: Aikawa Yataro Date: Mon, 19 Aug 2024 08:04:28 +0000 Subject: [PATCH] refactor: instead of a hardcoded path, use the `-r` when creating a relative link --- build/resources/rpm/SPECS/build.spec | 2 +- build/scripts/package.linux.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build/resources/rpm/SPECS/build.spec b/build/resources/rpm/SPECS/build.spec index ba47aed4..289cbe39 100644 --- a/build/resources/rpm/SPECS/build.spec +++ b/build/resources/rpm/SPECS/build.spec @@ -19,7 +19,7 @@ mkdir -p %{buildroot}/%{_bindir} mkdir -p %{buildroot}/usr/share/applications mkdir -p %{buildroot}/usr/share/icons cp -f ../../../SourceGit/* %{buildroot}/opt/sourcegit/ -ln -sf ../../opt/sourcegit/sourcegit %{buildroot}/%{_bindir} +ln -rsf %{buildroot}/opt/sourcegit/sourcegit %{buildroot}/%{_bindir} cp -r ../../_common/applications %{buildroot}/%{_datadir} cp -r ../../_common/icons %{buildroot}/%{_datadir} chmod 755 -R %{buildroot}/opt/sourcegit diff --git a/build/scripts/package.linux.sh b/build/scripts/package.linux.sh index 04309018..5eceffd6 100755 --- a/build/scripts/package.linux.sh +++ b/build/scripts/package.linux.sh @@ -60,7 +60,7 @@ mkdir -p resources/deb/usr/bin mkdir -p resources/deb/usr/share/applications mkdir -p resources/deb/usr/share/icons cp -f SourceGit/* resources/deb/opt/sourcegit -ln -sf ../../opt/sourcegit/sourcegit resources/deb/usr/bin +ln -rsf resources/deb/opt/sourcegit/sourcegit resources/deb/usr/bin cp -r resources/_common/applications resources/deb/usr/share cp -r resources/_common/icons resources/deb/usr/share sed -i -e "s/^Version:.*/Version: $VERSION/" -e "s/^Architecture:.*/Architecture: $arch/" resources/deb/DEBIAN/control