Changeset 374 for trunk/confmanlib.sh.in
- Timestamp:
- 07/02/2009 14:26:52 (3 years ago)
- File:
-
- 1 edited
-
trunk/confmanlib.sh.in (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/confmanlib.sh.in
r373 r374 29 29 REPO_ACTION="${REPO_DB}/last_action" 30 30 REPO_SYNC_STATE="${REPO_DB}/state" 31 METADIR="${WORK_PATH}/meta"32 RECIPEDIR="${METADIR}/recipes"33 31 RECIPE_NAME="$(cat "$RECIPE_FILE" 2>/dev/null)" 34 RECIPE_PATH="${RECIPEDIR}/${RECIPE_NAME}"35 32 36 33 VERSION="1.9.a" 37 34 REPO_VERSION="2" 38 REPO_VERSION_FILE="${METADIR}/rversion"39 35 40 36 # Prints the repository URI … … 53 49 54 50 echo $uri 51 } 52 53 function conf_meta_dir { 54 echo "${WORK_PATH}/meta" 55 } 56 57 function conf_recipe_dir { 58 echo "$(conf_meta_dir)/recipes" 59 } 60 61 function conf_recipe_path { 62 echo "$(conf_recipe_dir)/${RECIPE_NAME}" 55 63 } 56 64 … … 256 264 ;; 257 265 recipe) 258 RECIPEDIR="${WORK_PATH}/meta/recipes" # until ticket #35 is resolved 259 for recipefile in ${RECIPEDIR}/*; do 266 for recipefile in $(conf_recipe_dir)/*; do 260 267 modules="meta $(conf_get_recipe $recipefile)" 261 tar -czf "$exportpath/${recipefile#$ RECIPEDIR/}.tgz" -C "${WORK_PATH}" $modules268 tar -czf "$exportpath/${recipefile#$(conf_recipe_dir)/}.tgz" -C "${WORK_PATH}" $modules 262 269 done 263 270 ;; … … 758 765 # Returns the current revision number of the repository on stdout 759 766 function conf_revision { 760 METADIR="${WORK_PATH}/meta" # until ticket #35 is resolved 761 @SVN@ info ${METADIR} | awk '/Last Changed Rev:/ {print $4}' 767 @SVN@ info $(conf_meta_dir) | awk '/Last Changed Rev:/ {print $4}' 762 768 } 763 769 … … 785 791 786 792 if [ -z "$recipe" ] ; then 787 recipe_file="$ RECIPE_PATH"793 recipe_file="$(conf_recipe_path)" 788 794 fi 789 795 … … 815 821 function conf_recipe_create { 816 822 local recipe="$1" 817 local recipe_file="$ {RECIPEDIR}/${recipe}"823 local recipe_file="$(conf_recipe_dir)/${recipe}" 818 824 if [ -f "${recipe_file}" ] ; then 819 825 echo "Recipe $recipe already exists!" >&2 … … 827 833 local recipe="$1" 828 834 local recipe_file="$2" 829 cat "$recipe_file" > "$ {RECIPEDIR}/${recipe}"830 @SVN@ commit "$ {RECIPEDIR}/${recipe}"835 cat "$recipe_file" > "$(conf_recipe_dir)/${recipe}" 836 @SVN@ commit "$(conf_recipe_dir)/${recipe}" 831 837 } 832 838 833 839 function conf_remove_recipe { 834 840 local recipe="$1" 835 local recipe_file="$ {RECIPEDIR}/${recipe}"841 local recipe_file="$(conf_recipe_dir)/${recipe}" 836 842 if ! [ -f "${recipe_file}" ] ; then 837 843 echo "Recipe $recipe doesn't exist!" >&2
Note: See TracChangeset
for help on using the changeset viewer.
