Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
some helper scripts to make management of the source a touch easier
- Loading branch information
1 parent
c31b942
commit d20e986
Showing
5 changed files
with
165 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,47 @@ | |||
#!/bin/bash | |||
|
|||
fWelcome() { | |||
clear | |||
echo "=======================================================" | |||
echo " _ _ _ _ _ _____ _ _______ _ _______ " | |||
echo "| || || | | | (_____) | | (_______) | (_______)" | |||
echo "| || || | |__ | | _ \ \ _ | | _____ " | |||
echo "| ||_|| | __)| | | | \ \| | | | | ___) " | |||
echo "| |___| | | | |_| |_ _____) ) |_____| |_____| |_____ " | |||
echo " \______|_| |_(_____|______/ \______)_______)_______)" | |||
echo " - - - Signaling the start of next generation telephony" | |||
echo "=======================================================" | |||
echo | |||
} | |||
|
|||
fCheckoutBeam() { | |||
echo "# git checkout HEAD $1" | |||
|
|||
git checkout HEAD $1 | |||
|
|||
return $? | |||
} | |||
|
|||
fConfirm() { | |||
read -p "This will revert all beams to the HEAD versions. Are you sure you want to do this(y/N)? " -n 1 | |||
|
|||
for confirm in y Y yes YES Yes; do | |||
[ "${REPLY}" == "${confirm}" ] && echo && return 0 | |||
done | |||
|
|||
echo | |||
return 1 | |||
} | |||
|
|||
cd `dirname $0` | |||
|
|||
fWelcome | |||
fConfirm || exit 1 | |||
|
|||
while read beam; do | |||
fCheckoutBeam $beam || exit 1 | |||
done < <(find ../ -name "*.beam") | |||
|
|||
echo "All erlang beam files reverted to HEAD versions." | |||
|
|||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,36 @@ | |||
#!/bin/bash | |||
|
|||
fWelcome() { | |||
clear | |||
echo "=======================================================" | |||
echo " _ _ _ _ _ _____ _ _______ _ _______ " | |||
echo "| || || | | | (_____) | | (_______) | (_______)" | |||
echo "| || || | |__ | | _ \ \ _ | | _____ " | |||
echo "| ||_|| | __)| | | | \ \| | | | | ___) " | |||
echo "| |___| | | | |_| |_ _____) ) |_____| |_____| |_____ " | |||
echo " \______|_| |_(_____|______/ \______)_______)_______)" | |||
echo " - - - Signaling the start of next generation telephony" | |||
echo "=======================================================" | |||
echo | |||
} | |||
|
|||
fFindIgnoredFiles() { | |||
while read file; do | |||
fGitRm ${file} | |||
done < <(find ../ -name "$1") | |||
} | |||
|
|||
fGitRm() { | |||
echo "# git rm --cached $1" | |||
git rm --cached $1 | |||
} | |||
|
|||
cd `dirname $0` | |||
|
|||
fWelcome | |||
|
|||
while read ignore; do | |||
fFindIgnoredFiles ${ignore} | |||
done < ../.gitignore | |||
|
|||
echo "All ignored files removed from git, please commit any changes now." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,40 @@ | |||
#!/bin/bash | |||
|
|||
fWelcome() { | |||
clear | |||
echo "=======================================================" | |||
echo " _ _ _ _ _ _____ _ _______ _ _______ " | |||
echo "| || || | | | (_____) | | (_______) | (_______)" | |||
echo "| || || | |__ | | _ \ \ _ | | _____ " | |||
echo "| ||_|| | __)| | | | \ \| | | | | ___) " | |||
echo "| |___| | | | |_| |_ _____) ) |_____| |_____| |_____ " | |||
echo " \______|_| |_(_____|______/ \______)_______)_______)" | |||
echo " - - - Signaling the start of next generation telephony" | |||
echo "=======================================================" | |||
echo | |||
} | |||
|
|||
fCleanUpLocal() { | |||
echo "# git gc --prune=now" | |||
git gc --prune=now | |||
} | |||
|
|||
fCreateMissingBranches() { | |||
while read r; do | |||
l="`echo -n $r | cut -d/ -f 2`" | |||
if [[ -z "`git branch | grep $l`" && "$l" != "HEAD" ]]; then | |||
echo "# git branch --track $l $r" | |||
git branch --track $l $r | |||
fi | |||
done < <(git for-each-ref --format='%(refname:short)' refs/remotes) | |||
} | |||
|
|||
cd `dirname $0` | |||
|
|||
fWelcome | |||
fCleanUpLocal | |||
fCreateMissingBranches | |||
|
|||
echo "Whistle remote branches imported" | |||
|
|||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters