Anonymous avatar Anonymous committed 230d7cf

Reindent pbuilder script in a uniform way

Comments (0)

Files changed (1)

 shift
 
 case "${PBCURRENTCOMMANDLINEOPERATION}" in
-    --create|create)
-	/usr/lib/pbuilder/pbuilder-createbuildenv "$@"
+	--create|create)
+		/usr/lib/pbuilder/pbuilder-createbuildenv "$@"
 	;;
-    --update|update)
-	/usr/lib/pbuilder/pbuilder-updatebuildenv "$@"
+	--update|update)
+		/usr/lib/pbuilder/pbuilder-updatebuildenv "$@"
 	;;
-    --build|build)
-	/usr/lib/pbuilder/pbuilder-buildpackage "$@"
+	--build|build)
+		/usr/lib/pbuilder/pbuilder-buildpackage "$@"
 	;;
-    --clean|clean)
-	. /usr/lib/pbuilder/pbuilder-checkparams
-	if [ -n "$BASEBUILDPLACE" ]; then 
-	    log "I: Cleaning [$BASEBUILDPLACE]"
-	    clean_subdirectories "$BASEBUILDPLACE" || true
-	fi
-	if [ -n "$APTCACHE" ]; then
-	    log "I: Cleaning [$APTCACHE]"
-	    rm "$APTCACHE"/* || true
-	fi
+	--clean|clean)
+		. /usr/lib/pbuilder/pbuilder-checkparams
+		if [ -n "$BASEBUILDPLACE" ]; then 
+			log "I: Cleaning [$BASEBUILDPLACE]"
+			clean_subdirectories "$BASEBUILDPLACE" || true
+		fi
+		if [ -n "$APTCACHE" ]; then
+			log "I: Cleaning [$APTCACHE]"
+			rm "$APTCACHE"/* || true
+		fi
 	;;
-    --login|login)
-	. /usr/lib/pbuilder/pbuilder-checkparams
-	. /usr/lib/pbuilder/pbuilder-runhooks
-	extractbuildplace
-	trap umountproc_cleanbuildplace_trap exit sighup
-	copyinputfile "${BUILDPLACE}/tmp/buildd"
-	loadhooks
-	recover_aptcache
-	trap saveaptcache_umountproc_cleanbuildplace_trap exit sighup
+	--login|login)
+		. /usr/lib/pbuilder/pbuilder-checkparams
+		. /usr/lib/pbuilder/pbuilder-runhooks
+		extractbuildplace
+		trap umountproc_cleanbuildplace_trap exit sighup
+		copyinputfile "${BUILDPLACE}/tmp/buildd"
+		loadhooks
+		recover_aptcache
+		trap saveaptcache_umountproc_cleanbuildplace_trap exit sighup
 
-	if [ "${INTERNAL_BUILD_UML}" = "yes" ]; then
-	    log "I: entering the shell"
-	else
-	    log "I: entering the shell
+		if [ "${INTERNAL_BUILD_UML}" = "yes" ]; then
+			log "I: entering the shell"
+		else
+			log "I: entering the shell
 File extracted to: $BUILDPLACE
 "
-	fi
-	executehooks "F"
-	(${CHROOTEXEC} bin/bash -c 'exec -a -bash bin/bash')
-	RET=$?
+		fi
+		executehooks "F"
+		(${CHROOTEXEC} bin/bash -c 'exec -a -bash bin/bash')
+		RET=$?
 
-	save_aptcache
+		save_aptcache
 
-	trap umountproc_cleanbuildplace_trap exit sighup
+		trap umountproc_cleanbuildplace_trap exit sighup
 
-	# saving the place afterwards
-	if [ "${SAVE_AFTER_LOGIN}" = "yes" ]; then
-	    if [ "${INTERNAL_BUILD_UML}" = "yes" ]; then
-		log "E: Invalid combination of internal-build-uml and save-after-login flags"
-		exit 1
-	    else
-		log "I: Saving the results, modifications to this session will persist"
-		unloadhooks
-		umountproc
-		trap cleanbuildplace_trap exit sighup
-		${CHROOTEXEC} /usr/bin/apt-get clean || true
-		create_basetgz
-		cleanbuildplace
+		# saving the place afterwards
+		if [ "${SAVE_AFTER_LOGIN}" = "yes" ]; then
+			if [ "${INTERNAL_BUILD_UML}" = "yes" ]; then
+				log "E: Invalid combination of internal-build-uml and save-after-login flags"
+				exit 1
+			else
+				log "I: Saving the results, modifications to this session will persist"
+				unloadhooks
+				umountproc
+				trap cleanbuildplace_trap exit sighup
+				${CHROOTEXEC} /usr/bin/apt-get clean || true
+				create_basetgz
+				cleanbuildplace
+				trap - exit sighup
+				exit $RET
+			fi
+		fi
+		umountproc_cleanbuildplace
 		trap - exit sighup
 		exit $RET
-	    fi
-	fi
-	umountproc_cleanbuildplace
-	trap - exit sighup
-	exit $RET
 	;;
-    --execute|execute)
-	# try to execute arbitrary program.
-	. /usr/lib/pbuilder/pbuilder-checkparams
-	. /usr/lib/pbuilder/pbuilder-runhooks
-	EXECPROGRAM="$1"
-	shift
-	if [ ! -f "${EXECPROGRAM}" ]; then
-	    log "E: Command line parameter [$EXECPROGRAM] does not exist"
-	    exit 1;
-	fi;
-	extractbuildplace
+	--execute|execute)
+		# try to execute arbitrary program.
+		. /usr/lib/pbuilder/pbuilder-checkparams
+		. /usr/lib/pbuilder/pbuilder-runhooks
+		EXECPROGRAM="$1"
+		shift
+		if [ ! -f "${EXECPROGRAM}" ]; then
+			log "E: Command line parameter [$EXECPROGRAM] does not exist"
+			exit 1;
+		fi;
+		extractbuildplace
 
-	trap umountproc_cleanbuildplace_trap exit sighup
-	copyinputfile "${BUILDPLACE}/tmp/buildd"
-	loadhooks
-	recover_aptcache
-	trap saveaptcache_umountproc_cleanbuildplace_trap exit sighup
+		trap umountproc_cleanbuildplace_trap exit sighup
+		copyinputfile "${BUILDPLACE}/tmp/buildd"
+		loadhooks
+		recover_aptcache
+		trap saveaptcache_umountproc_cleanbuildplace_trap exit sighup
 
-	RUNNAME="$BUILDPLACE/runscript"
-	cat "$EXECPROGRAM" > "$RUNNAME"
-	chmod a+x "$RUNNAME"
-	executehooks "F"
-	( ${CHROOTEXEC} /runscript "$@" )
-	RET=$?
-	rm -f "$RUNNAME"
+		RUNNAME="$BUILDPLACE/runscript"
+		cat "$EXECPROGRAM" > "$RUNNAME"
+		chmod a+x "$RUNNAME"
+		executehooks "F"
+		( ${CHROOTEXEC} /runscript "$@" )
+		RET=$?
+		rm -f "$RUNNAME"
 
-	save_aptcache
-	trap umountproc_cleanbuildplace_trap exit sighup
+		save_aptcache
+		trap umountproc_cleanbuildplace_trap exit sighup
 
-	# saving the place afterwards
-	if [ "${SAVE_AFTER_LOGIN}" = "yes" ]; then
-	    if [ "${INTERNAL_BUILD_UML}" = "yes" ]; then
-		log "E: Invalid combination of internal-build-uml and save-after-login flags"
-	    else
-		log "I: Saving the results, modifications to this session will persist"
-		unloadhooks
-		umountproc
-		trap cleanbuildplace_trap exit sighup
-		${CHROOTEXEC} /usr/bin/apt-get clean || true
-		create_basetgz
-		cleanbuildplace
+		# saving the place afterwards
+		if [ "${SAVE_AFTER_LOGIN}" = "yes" ]; then
+			if [ "${INTERNAL_BUILD_UML}" = "yes" ]; then
+				log "E: Invalid combination of internal-build-uml and save-after-login flags"
+			else
+				log "I: Saving the results, modifications to this session will persist"
+				unloadhooks
+				umountproc
+				trap cleanbuildplace_trap exit sighup
+				${CHROOTEXEC} /usr/bin/apt-get clean || true
+				create_basetgz
+				cleanbuildplace
+				trap - exit sighup
+				exit $RET
+			fi
+		fi
+		umountproc_cleanbuildplace
 		trap - exit sighup
 		exit $RET
-	    fi
-	fi
-	umountproc_cleanbuildplace
-	trap - exit sighup
-	exit $RET
 	;;
-    --dumpconfig|dumpconfig)
-	. /usr/lib/pbuilder/pbuilder-checkparams
-	. /usr/lib/pbuilder/pbuilder-runhooks
-	extractbuildplace
-	trap umountproc_cleanbuildplace_trap exit sighup
-	loadhooks
-	executehooks "F"
-	log "I: start dump config"
-	log "I: set"
-	set;
-	log "I: env"
-	env;
-	log "I: end dump config"
+	--dumpconfig|dumpconfig)
+		. /usr/lib/pbuilder/pbuilder-checkparams
+		. /usr/lib/pbuilder/pbuilder-runhooks
+		extractbuildplace
+		trap umountproc_cleanbuildplace_trap exit sighup
+		loadhooks
+		executehooks "F"
+		log "I: start dump config"
+		log "I: set"
+		set;
+		log "I: env"
+		env;
+		log "I: end dump config"
 	;;
-    --debuild|debuild)
-	"$0" execute "$@" /usr/lib/pbuilder/pdebuild-internal
+	--debuild|debuild)
+		"$0" execute "$@" /usr/lib/pbuilder/pdebuild-internal
 	;;
-    *)
-	. /usr/lib/pbuilder/pbuilder-modules
-	showhelp
+	*)
+		. /usr/lib/pbuilder/pbuilder-modules
+		showhelp
 	;;
 esac
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.