- Timestamp:
- 07/02/2009 14:45:11 (3 years ago)
- Location:
- branches/confman-1.9
- Files:
-
- 5 edited
-
. (modified) (1 prop)
-
abspath.in (modified) (1 prop)
-
conflock.in (modified) (1 prop)
-
confman.in (modified) (3 diffs)
-
confmanlib.sh.in (modified) (8 diffs, 1 prop)
Legend:
- Unmodified
- Added
- Removed
-
branches/confman-1.9
-
branches/confman-1.9/abspath.in
- Property svn:mergeinfo changed (with no actual effect on merging)
-
branches/confman-1.9/conflock.in
- Property svn:mergeinfo changed (with no actual effect on merging)
-
branches/confman-1.9/confman.in
r358 r375 876 876 local recipe="$1" 877 877 local recipe_file=$(conf_tmp_file) 878 cat "$ {RECIPEDIR}/${recipe}" > "$recipe_file"878 cat "$(conf_recipe_dir)/${recipe}" > "$recipe_file" 879 879 $EDITOR "$recipe_file" 880 880 for module in $(conf_get_recipe ${recipe_file}) ; do … … 911 911 if [ -z "$1" ] ; then print_usage 1 ; fi 912 912 local recipe="$1" 913 if ! [ -f "$ {RECIPEDIR}/${recipe}" ] ; then913 if ! [ -f "$(conf_recipe_dir)/${recipe}" ] ; then 914 914 echo "Error: recipe $recipe does not exist. Create it first!" >&2 915 915 exit 1 … … 921 921 if [ -z "$1" ] ; then print_usage 1 ; fi 922 922 local recipe="$1" 923 if ! [ -f "$ {RECIPEDIR}/${recipe}" ] ; then923 if ! [ -f "$(conf_recipe_dir)/${recipe}" ] ; then 924 924 echo "Error: recipe $recipe does not exist." >&2 925 925 exit 1 926 926 fi 927 cat "$ {RECIPEDIR}/${recipe}"927 cat "$(conf_recipe_dir)/${recipe}" 928 928 } 929 929 930 930 function recipe_list { 931 cd $ {RECIPEDIR}931 cd $(conf_recipe_dir) 932 932 ls 933 933 } -
branches/confman-1.9/confmanlib.sh.in
- Property svn:mergeinfo changed
/trunk/confmanlib.sh.in merged: 373-374
r372 r375 29 29 REPO_ACTION="${REPO_DB}/last_action" 30 30 REPO_SYNC_STATE="${REPO_DB}/state" 31 WCLOCKFILE="${WORK_PATH}/confman.lock"32 METADIR="${WORK_PATH}/meta"33 RECIPEDIR="${METADIR}/recipes"34 31 RECIPE_NAME="$(cat "$RECIPE_FILE" 2>/dev/null)" 35 RECIPE_PATH="${RECIPEDIR}/${RECIPE_NAME}"36 32 37 33 VERSION="1.9.a" 38 34 REPO_VERSION="2" 39 REPO_VERSION_FILE="${METADIR}/rversion"40 35 41 36 # Prints the repository URI … … 54 49 55 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}" 56 63 } 57 64 … … 85 92 86 93 # Functions for locking and unlocking both the system and the working copy 94 function conf_wcopy_lockfile { 95 echo "${WORK_PATH}/confman.lock" 96 } 97 87 98 function conf_lock_wcopy { 88 ${LOCK} lock $$ "$WCLOCKFILE"|| exit 199 ${LOCK} lock $$ $(conf_wcopy_lockfile) || exit 1 89 100 } 90 101 91 102 function conf_unlock_wcopy { 92 ${LOCK} unlock $$ "$WCLOCKFILE"103 ${LOCK} unlock $$ $(conf_wcopy_lockfile) 93 104 } 94 105 95 106 function conf_wcopy_is_locked { 96 ${LOCK} haslock $$ "$WCLOCKFILE"107 ${LOCK} haslock $$ $(conf_wcopy_lockfile) 97 108 } 98 109 … … 253 264 ;; 254 265 recipe) 255 RECIPEDIR="${WORK_PATH}/meta/recipes" # until ticket #35 is resolved 256 for recipefile in ${RECIPEDIR}/*; do 266 for recipefile in $(conf_recipe_dir)/*; do 257 267 modules="meta $(conf_get_recipe $recipefile)" 258 tar -czf "$exportpath/${recipefile#$ RECIPEDIR/}.tgz" -C "${WORK_PATH}" $modules268 tar -czf "$exportpath/${recipefile#$(conf_recipe_dir)/}.tgz" -C "${WORK_PATH}" $modules 259 269 done 260 270 ;; … … 755 765 # Returns the current revision number of the repository on stdout 756 766 function conf_revision { 757 METADIR="${WORK_PATH}/meta" # until ticket #35 is resolved 758 @SVN@ info ${METADIR} | awk '/Last Changed Rev:/ {print $4}' 767 @SVN@ info $(conf_meta_dir) | awk '/Last Changed Rev:/ {print $4}' 759 768 } 760 769 … … 782 791 783 792 if [ -z "$recipe" ] ; then 784 recipe_file="$ RECIPE_PATH"793 recipe_file="$(conf_recipe_path)" 785 794 fi 786 795 … … 812 821 function conf_recipe_create { 813 822 local recipe="$1" 814 local recipe_file="$ {RECIPEDIR}/${recipe}"823 local recipe_file="$(conf_recipe_dir)/${recipe}" 815 824 if [ -f "${recipe_file}" ] ; then 816 825 echo "Recipe $recipe already exists!" >&2 … … 824 833 local recipe="$1" 825 834 local recipe_file="$2" 826 cat "$recipe_file" > "$ {RECIPEDIR}/${recipe}"827 @SVN@ commit "$ {RECIPEDIR}/${recipe}"835 cat "$recipe_file" > "$(conf_recipe_dir)/${recipe}" 836 @SVN@ commit "$(conf_recipe_dir)/${recipe}" 828 837 } 829 838 830 839 function conf_remove_recipe { 831 840 local recipe="$1" 832 local recipe_file="$ {RECIPEDIR}/${recipe}"841 local recipe_file="$(conf_recipe_dir)/${recipe}" 833 842 if ! [ -f "${recipe_file}" ] ; then 834 843 echo "Recipe $recipe doesn't exist!" >&2 - Property svn:mergeinfo changed
Note: See TracChangeset
for help on using the changeset viewer.
