- Timestamp:
- 10/30/07 12:07:14 (6 years ago)
- File:
-
- 1 edited
-
scripts/autobuild.bash (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
scripts/autobuild.bash
r2364 r2369 5 5 # 6 6 # Created: 2007-10-20 15:10 +330 GMT 7 # Updated: 2007-10-30 08:56+330 GMT7 # Updated: 2007-10-30 14:35 +330 GMT 8 8 # 9 9 # TODO: … … 123 123 POOL=`find ./ -type d | grep /$SRC_PKG_NAME$ | awk 'BEGIN{FS="/"}{print $3}'` 124 124 125 if [ -z "$POOL" ]; then 126 echo "${GREEN}Couldn't detect pool folder name, trying to calculate...${NORMAL}" 127 128 case "$SRC_PKG_NAME" in 129 lib*) 130 POOL=`echo $SRC_PKG_NAME | cut -c1-4` 131 ;; 132 *) 133 POOL=`echo $SRC_PKG_NAME | cut -c1` 134 ;; 135 esac 136 echo "${GREEN}Detected pool as: ${YELLOW}$POOL${NORMAL}" 137 fi 138 125 139 cd $SVN_REPO_PATH 126 140 COMPONENT=`find ./ -maxdepth 2 -type d | grep /$SRC_PKG_NAME$ | awk 'BEGIN{FS="/"}{print $2}'` … … 129 143 echo "${GREEN}Detected component: ${YELLOW}$COMPONENT${NORMAL}" 130 144 else 131 echo "${GREEN}Couldn't detect component, exiting...${NORMAL}" 132 exit 145 echo "${GREEN}Couldn't detect component, updating SVN...${NORMAL}" 146 # Local working copy is out dated? 147 svn up --username $SVN_USER --password $SVN_PASS &> /dev/null 148 COMPONENT=`find ./ -maxdepth 2 -type d | grep /$SRC_PKG_NAME$ | awk 'BEGIN{FS="/"}{print $2}'` 133 149 fi 134 150 … … 137 153 cd $SVN_REPO_PATH/$COMPONENT/$SRC_PKG_NAME 138 154 else 139 # Local working copy is out dated? 140 svn up --username $SVN_USER --password $SVN_PASS &> /dev/null 141 if [ -d $SVN_REPO_PATH/$COMPONENT/$SRC_PKG_NAME ]; then 142 cd $SVN_REPO_PATH/$COMPONENT/$SRC_PKG_NAME 143 else 144 echo "${GREEN}SVN directory does not exists, exiting...${NORMAL}" 145 exit 146 fi 155 echo "${GREEN}SVN directory does not exists, exiting...${NORMAL}" 156 exit 147 157 fi 148 158 … … 230 240 231 241 echo "${GREEN}Copying orig tarball to the local apt repo...${NORMAL}" 242 243 # Not exists? Create it! 244 if [ ! -d "$LOCAL_REPO_PATH/$COMPONENT/$POOL/$SRC_PKG_NAME" ]; then 245 mkdir -p "$LOCAL_REPO_PATH/$COMPONENT/$POOL/$SRC_PKG_NAME" 246 fi 247 232 248 cp *."$TARBALL_EXT" "$LOCAL_REPO_PATH/$COMPONENT/$POOL/$SRC_PKG_NAME/" -v >> $LOG_FILE 233 249 … … 277 293 echo "${GREEN}Tagging $SRC_PKG_NAME $UPSTREAM_VERSION-$PKG_REVISION" >> $LOG_FILE 278 294 295 if [ ! -d tags ]; then 296 mkdir tags &> /dev/null 297 svn add tags &> /dev/null 298 fi 299 279 300 svn copy trunk/ tags/$UPSTREAM_VERSION-$PKG_REVISION &> /dev/null 280 301 svn commit -m "BUILDD: Tagging $SRC_PKG_NAME $UPSTREAM_VERSION-$PKG_REVISION" --username $SVN_USER --password $SVN_PASS &> /dev/null … … 282 303 echo "${GREEN}Tagging ${YELLOW}$SRC_PKG_NAME $UPSTREAM_VERSION${NORMAL} ${GREEN}...${NORMAL}" 283 304 echo "${GREEN}Tagging $SRC_PKG_NAME $UPSTREAM_VERSION" >> $LOG_FILE 305 306 if [ ! -d tags ]; then 307 mkdir tags &> /dev/null 308 svn add tags &> /dev/null 309 fi 284 310 285 311 svn copy trunk/ tags/$UPSTREAM_VERSION &> /dev/null
Note: See TracChangeset
for help on using the changeset viewer.


