summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--po/POTFILES.in2
-rw-r--r--scripts/Makefile.am12
-rw-r--r--scripts/calcurse-upgrade.sh.in (renamed from scripts/calcurse-upgrade.sh)0
3 files changed, 10 insertions, 4 deletions
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 2219c3d..6b3969a 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -27,4 +27,4 @@ src/utils.c
src/vars.c
src/wins.c
-scripts/calcurse-upgrade.sh
+scripts/calcurse-upgrade.sh.in
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