#!/bin/bash # Script that sets various flags for a package (by creating # empty files in the pkg home dir) # # 2do: # package user is new or there is a new package available for compilation. # 2compile # package needs to be recompiled. # 2clean: # package needs to have files left over from previous # installation removed after the dependent pkgs are # recompiled. # 2setup: # package needs to be configured/setup. # 2update: # package may have an updated version available. # 2download: # a new version is available for download. # 2tmp: # temporary flag for use on case-by-case basis. # 2fixlink # fix problem with the download location. source `which ttPM-funcs` # Figure out the name under which it is called FLAG=${1} shift if [ "$FLAG" != "2do" -a "$FLAG" != "2compile" -a "$FLAG" != "2clean" -a "$FLAG" != "2setup" -a "$FLAG" != "2update" -a "$FLAG" != "2download" -a "$FLAG" != "2tmp" -a "$FLAG" != "2fixlink" ] then error "The script should be called with the flag that you would like to set" fi #printMsg "Flag: $FLAG" # For each parameter entered add a flag for that package until [ -z "$1" ] do touch ${TT_HOME_DIR}/${1}/${FLAG} 2>/dev/null && chown ${1}:${1} ${TT_HOME_DIR}/${1}/${FLAG} && printMsg info "${1} Added" shift done # Print the packages that have the given flag set for F in $(find ${TT_HOME_DIR} -mindepth 2 -maxdepth 2 -name ${FLAG} -printf "%u\n" | sort) do printMsg warning $F done