Skip to content
Newer
Older
100755 48 lines (35 sloc) 1.18 KB
d20e986 @k-anderson some helper scripts to make management of the source a touch easier
k-anderson authored
1 #!/bin/bash
2
3 fWelcome() {
4 clear
5 echo "======================================================="
6 echo " _ _ _ _ _ _____ _ _______ _ _______ "
7 echo "| || || | | | (_____) | | (_______) | (_______)"
8 echo "| || || | |__ | | _ \ \ _ | | _____ "
9 echo "| ||_|| | __)| | | | \ \| | | | | ___) "
10 echo "| |___| | | | |_| |_ _____) ) |_____| |_____| |_____ "
11 echo " \______|_| |_(_____|______/ \______)_______)_______)"
12 echo " - - - Signaling the start of next generation telephony"
13 echo "======================================================="
14 echo
15 }
16
17 fCheckoutBeam() {
18 echo "# git checkout HEAD $1"
19
20 git checkout HEAD $1
21
22 return $?
23 }
24
25 fConfirm() {
26 read -p "This will revert all beams to the HEAD versions. Are you sure you want to do this(y/N)? " -n 1
27
28 for confirm in y Y yes YES Yes; do
29 [ "${REPLY}" == "${confirm}" ] && echo && return 0
30 done
31
32 echo
33 return 1
34 }
35
36 cd `dirname $0`
37
38 fWelcome
39 fConfirm || exit 1
40
41 while read beam; do
42 fCheckoutBeam $beam || exit 1
43 done < <(find ../ -name "*.beam")
44
45 echo "All erlang beam files reverted to HEAD versions."
46
47 exit 0
Something went wrong with that request. Please try again.