Skip to content

Commit

Permalink
motds: move motds to separate directory
Browse files Browse the repository at this point in the history
  • Loading branch information
agnostic-apollo committed Aug 13, 2022
1 parent 0785c8c commit 8114730
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 10 deletions.
11 changes: 2 additions & 9 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,7 @@
# along with termux-tools. If not, see
# <https://www.gnu.org/licenses/>.

SUBDIRS = scripts doc mirrors

# We have two variants of our motd message:
# 1. motd.sh: is sourced and echo'es a motd message with something that looks
# like termux's logo.
# 3. motd-playstore: plain text that will only be displayed if the termux-app
# version is very old (like the version found in playstore is)
sysconf_DATA = motd.sh motd-playstore
SUBDIRS = scripts doc mirrors motds

do_subst = sed -e "s%[@]TERMUX_PREFIX[@]%$(termux_prefix)%g" \
-e "s%[@]TERMUX_APP_PACKAGE[@]%${termux_app_package}%g" \
Expand All @@ -41,7 +34,7 @@ $1: $1.in Makefile
endef

# Login script
sysconf_DATA += termux-login.sh
sysconf_DATA = termux-login.sh

# profile.d script
pkgdata_PROFILE = init-termux-properties.sh
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,6 @@ AC_SUBST(termux_package_manager)
AC_PROG_LN_S

AC_CONFIG_FILES([Makefile scripts/Makefile doc/Makefile
mirrors/Makefile])
mirrors/Makefile motds/Makefile])

AC_OUTPUT
38 changes: 38 additions & 0 deletions motds/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Copyright (C) 2022 Termux

# This file is part of termux-tools.

# termux-tools is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.

# termux-tools is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with termux-tools. If not, see
# <https://www.gnu.org/licenses/>.


# We have two variants of our motd message loaded by login script:
# 1. motd.sh: A dynamic motd that is executed with bash and echos a
# motd message with escape sequences, optionally with a terminal logo.
# 2. motd: A static motd that is just read as is with cat and displayed.

# The motd-playstore is an additional motd that will only be displayed
# if the termux-app version is very old (like the version found on playstore)
sysconf_DATA = motd.sh motd-playstore

CLEANFILES = motd.sh


define process-rule
$1: $1.in Makefile
@echo "Creating $1"
@cat $(srcdir)/$1.in > $1
endef

$(eval $(call process-rule,motd.sh))
File renamed without changes.
File renamed without changes.

0 comments on commit 8114730

Please sign in to comment.