diff options
author | Michael Olbrich <m.olbrich@pengutronix.de> | 2011-09-02 14:43:42 +0200 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2011-09-03 16:01:23 +0200 |
commit | 9ef3729c1fa1d4aca87d4fe94fd18f56d817109e (patch) | |
tree | c56d4be2011b0a741b40d31d8d8b390b97bf3779 /scripts/lib/ptxd_make_xpkg_pkg.sh | |
parent | 539cab92c08696f73235ed2a68f1d64c7c165fd5 (diff) | |
download | ptxdist-9ef3729c1fa1d4aca87d4fe94fd18f56d817109e.tar.gz ptxdist-9ef3729c1fa1d4aca87d4fe94fd18f56d817109e.tar.xz |
install_replace_figlet: added
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'scripts/lib/ptxd_make_xpkg_pkg.sh')
-rw-r--r-- | scripts/lib/ptxd_make_xpkg_pkg.sh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/scripts/lib/ptxd_make_xpkg_pkg.sh b/scripts/lib/ptxd_make_xpkg_pkg.sh index 096ef7d6f..ad0884227 100644 --- a/scripts/lib/ptxd_make_xpkg_pkg.sh +++ b/scripts/lib/ptxd_make_xpkg_pkg.sh @@ -369,6 +369,30 @@ install replace: } export -f ptxd_install_replace +ptxd_install_replace_figlet() { + local dst="$1" + local placeholder="$2" + local value="$3" + local -a dirs ndirs pdirs sdirs + local mod_nfs mod_rw + + echo "\ +install replace figlet: + file=${dst} + '${placeholder}' -> '\`figlet ${value}\`' +" + + ptxd_install_setup && + + ptxd_exist "${dirs[@]/%/${dst}}" && + figlet="$(figlet -d "${PTXDIST_SYSROOT_HOST}/share/figlet" -- "${value}" | \ + awk '{ gsub("\\\\", "`"); if ($0 !~ "^ *$") printf("%s\\n", $0) }')" && + sed -i -e "s#${placeholder}#${figlet}#g" "${dirs[@]/%/${dst}}" || + + ptxd_install_error "install_replace failed!" +} +export -f ptxd_install_replace_figlet + ptxd_install_generic() { local file="$1" local dst="$2" |