Skip to content
This repository
tag: v1.37.11
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

executable file 48 lines (35 sloc) 1.205 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 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
Something went wrong with that request. Please try again.