diff options
| author | Simon Rettberg | 2013-08-14 20:58:54 +0200 |
|---|---|---|
| committer | Simon Rettberg | 2013-08-14 20:58:54 +0200 |
| commit | 9d4e9bf4e8db96ea5148f2a25ccda96c49a95913 (patch) | |
| tree | a842d17dd45cfda21510a2bfdb07c4115adab367 /remote | |
| parent | Merge branch 'master' of simonslx:openslx-ng/tm-scripts (diff) | |
| download | tm-scripts-9d4e9bf4e8db96ea5148f2a25ccda96c49a95913.tar.gz tm-scripts-9d4e9bf4e8db96ea5148f2a25ccda96c49a95913.tar.xz tm-scripts-9d4e9bf4e8db96ea5148f2a25ccda96c49a95913.zip | |
[debug] Add htop
[setup_target] Make it possible to mark required binaries as optional by prefixing them with '@'
Diffstat (limited to 'remote')
| -rw-r--r-- | remote/modules/debug/debug.build | 1 | ||||
| -rw-r--r-- | remote/modules/debug/debug.conf | 1 | ||||
| -rwxr-xr-x | remote/setup_target | 11 |
3 files changed, 11 insertions, 2 deletions
diff --git a/remote/modules/debug/debug.build b/remote/modules/debug/debug.build index e791d347..c020181d 100644 --- a/remote/modules/debug/debug.build +++ b/remote/modules/debug/debug.build @@ -5,6 +5,7 @@ fetch_source() { build() { for BIN in $REQUIRED_BINARIES; do + [[ "$BIN" == @* ]] && BIN=$(echo "$BIN" | cut -c 2-) BIN_LOCATION=$(which ${BIN}) if [ ! -z ${BIN_LOCATION} -a -e ${BIN_LOCATION} ]; then tarcopy "$(get_link_chain ${BIN_LOCATION})" "${MODULE_BUILD_DIR}" diff --git a/remote/modules/debug/debug.conf b/remote/modules/debug/debug.conf index b7242b58..ba1f065e 100644 --- a/remote/modules/debug/debug.conf +++ b/remote/modules/debug/debug.conf @@ -9,4 +9,5 @@ REQUIRED_BINARIES=" fc-query xset locale + @htop " diff --git a/remote/setup_target b/remote/setup_target index f0722055..60cf23b5 100755 --- a/remote/setup_target +++ b/remote/setup_target @@ -151,10 +151,17 @@ copy_files_with_deps () { COPYFILES_LIST="list_wanted_stage3.2" [ -e "${COPYFILES_LIST}" ] && rm "${COPYFILES_LIST}" - + [ ! -z "${REQUIRED_BINARIES}" ] && pinfo "Gathering required binaries from config file..." + local OPTIONAL for FILENAME in ${REQUIRED_BINARIES} do + if [[ "$FILENAME" == @* ]]; then + OPTIONAL="yes" + FILENAME=$(echo "$FILENAME" | cut -c 2- ) + else + OPTIONAL="no" + fi local FILE_CANDIDATES=$( find . -name "${FILENAME}" -a \( -type f -o -type l \) ) # only do if more than one candidate found if [ "$(echo $FILE_CANDIDATES | wc -w)" -gt 1 ]; then @@ -175,7 +182,7 @@ copy_files_with_deps () { else pdebug "\tFound ${FILENAME} at ${FILE}" fi - elif [ "$(echo $FILE_CANDIDATES | wc -w)" -eq 0 ]; then + elif [ "$OPTIONAL" == "no" -a "$(echo $FILE_CANDIDATES | wc -w)" -eq 0 ]; then perror "Could not find required binary $FILENAME" else # one candidate |
