File: dh-exec-subst-env

package info (click to toggle)
imagemagick 8%3A6.9.11.60%2Bdfsg-1.6%2Bdeb12u3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 76,816 kB
  • sloc: ansic: 349,503; cpp: 21,804; xml: 11,029; perl: 6,417; sh: 5,877; makefile: 3,042; tcl: 459
file content (6 lines) | stat: -rwxr-xr-x 235 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
#! /usr/bin/perl -wnp
##
## This does nothing else, but substitute ${...} with the
## corresponding environment variable, or the original ${...} if the
## env. var does not exist.
s/(\$\{([^\}]+)\})/exists $ENV{$2} ? $ENV{$2} : $1/eg;