summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Makefile.am12
-rw-r--r--scripts/calcurse-upgrade.sh.in (renamed from scripts/calcurse-upgrade.sh)0
2 files changed, 9 insertions, 3 deletions
diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index 5502cfd..fc0b83b 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -4,10 +4,16 @@ dist_bin_SCRIPTS = \
calcurse-upgrade
EXTRA_DIST = \
- calcurse-upgrade.sh
+ calcurse-upgrade.sh.in
CLEANFILES = \
calcurse-upgrade
-calcurse-upgrade: calcurse-upgrade.sh
- $(AM_V_GEN) $(INSTALL) $< $@
+edit = sed \
+ -e 's|@PACKAGE_VERSION[@]|$(PACKAGE_VERSION)|g'
+
+calcurse-upgrade: calcurse-upgrade.sh.in
+ $(AM_V_at)$(RM) "$@"
+ $(AM_V_GEN)$(edit) <"$(srcdir)/$<" >"$@"
+ $(AM_V_at)chmod +x "$@"
+ $(AM_V_at)chmod a-w "$@"
diff --git a/scripts/calcurse-upgrade.sh b/scripts/calcurse-upgrade.sh.in
index bf3f92e..bf3f92e 100644
--- a/scripts/calcurse-upgrade.sh
+++ b/scripts/calcurse-upgrade.sh.in