Thread: Git
View Single Post
Old 09-28-2013, 12:53 PM   #13
aditya3098
Guru
aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.aditya3098 ought to be getting tired of karma fortunes by now.
 
Posts: 608
Karma: 1588610
Join Date: Jan 2012
Device: Kindle Scribe
Code:
#/bin/sh
GIT_LOOP="/mnt/us/extensions/git.img"
cd /mnt/us/extensions
function notifyUser(){
	#TODO
}
function mountGit() {
	mkdir -p /mnt/us/extensions/mountpoint-git
	mount -o loop $GIT_LOOP /mnt/us/extensions/mountpoint-git
	notifyUser "Mount success..."
}
function umountGit(){
	umount $GIT_LOOP
	notifyUser "Unmount success"
}
function updateExtensions() {
	for ext in ./*
	do
		cd "${ext}"
		/mnt/us/extensions/mountpoint-git/bin/git pull
		notifyUser "Successfully got ${ext} from git"
	done
}
mountGit
updateExtensions
umountGit
Stuff like that
aditya3098 is offline   Reply With Quote