Skip to content

Commit

Permalink
handle shell variables in a package name
Browse files Browse the repository at this point in the history
  • Loading branch information
Mrfai committed Sep 11, 2019
1 parent 5b0d053 commit 5a47906
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion bin/install_packages
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# install_packages -- read package config and install packages via apt-get
#
# This script is part of FAI (Fully Automatic Installation)
# (c) 2000-2018, Thomas Lange, lange@informatik.uni-koeln.de
# (c) 2000-2019, Thomas Lange, lange@informatik.uni-koeln.de
# (c) 2003-2004, Henning Glawe, glaweh@physik.fu-berlin.de
# (c) 2004 , Jonas Hoffmann, jhoffman@physik.fu-berlin.de
# PRELOAD feature from Thomas Gebhardt <gebhardt@hrz.uni-marburg.de>
Expand Down Expand Up @@ -526,6 +526,16 @@ sub clean_pkg_list {
insert_pkg($n, $pack, 1, "$n using $pack found") && next;
}

# handle $varname in package name
if ( $pack =~ s/\$\w+//) {
insert_pkg($n, $pack, 1, "$n using $pack found") && next;
}

# handle ${varname} in package name
if ( $pack =~ s/\$\{\w+\}//) {
insert_pkg($n, $pack, 1, "$n using $pack found") && next;
}

# else package is unknown
push @unknown, $n;
}
Expand Down

0 comments on commit 5a47906

Please sign in to comment.