From 73ecbe94c1573bc67ed407ef78166e2f210d139c Mon Sep 17 00:00:00 2001 From: Srikant Patnaik Date: Sat, 7 Feb 2015 14:25:10 +0530 Subject: modified patcher.sh and added a new sample file --- patcher.sh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'patcher.sh') diff --git a/patcher.sh b/patcher.sh index 4e0a8a4..690c01b 100755 --- a/patcher.sh +++ b/patcher.sh @@ -41,9 +41,9 @@ function check_internet() { #fetch updates from github and show function format_list_updates() { #make a local copy for editing - [ $INET_AVAILABLE -eq 1 ] && git log --format=\;\[%ar\]\;%s\;%h HEAD >\ + [ $INET_AVAILABLE -eq 1 ] && git log --format=\;\(%ar\)\;%s\;\(%h\) HEAD >\ $all_commits_one_liner_with_date - for each in $(cat $all_commits_one_liner_with_date | cut -d ';' -f 4) + for each in $(cat $all_commits_one_liner_with_date | cut -d ';' -f 4 | tr -d '(|)') do files_in_each_commit=$(git show --first-parent --pretty="format:" --name-only $each) echo $files_in_each_commit | tr ' ' ',' >> $files_in_all_commits @@ -57,11 +57,16 @@ function format_list_updates() { #function updates_ -function select_applied_updates() { +function select_updates() { #[ -f $past_applied_commits ] && paste $past_applied_commits - true + #menu $(cat $all_commits_dates_with_file_paths) + selected_update=$(menu -w 1000 -h 550 "$(cat $all_commits_dates_with_file_paths | \ + cut -d ';' -f 1,2,3,4| tr ';' ' ' )" 2>&1) + echo $selected_update } + + function clean_up() { [ -f robots.txt ] && rm robots.txt @@ -71,4 +76,5 @@ function clean_up() { #Function calls check_internet format_list_updates +select_updates clean_up -- cgit