Skip to content

Commit

Permalink
Added new git replace functions and repos
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Peacock committed Aug 15, 2018
1 parent debc9d4 commit a77a442
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 0 deletions.
3 changes: 3 additions & 0 deletions android.bash
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,6 @@ bot() { python $ANDROID_SCRIPTS_WIN\\build_ora_test.py $@ 2>&1; }

# Run OneRomanApp Tests
rot() { python $ANDROID_SCRIPTS_WIN\\run_ora_test.py $@ 2>&1; }

# Update the CDPGlobalSettings.cdp to allow connections from RomeFiddler
fiddler_enable() { python $ANDROID_SCRIPTS_WIN\\rome_fiddler_enable.py $@ 2>&1; }
7 changes: 7 additions & 0 deletions git.bash
Original file line number Diff line number Diff line change
Expand Up @@ -316,3 +316,10 @@ rm_untracked ()

# Adds the worktree with the given directory name. Run this in the main repo
add_worktree() { git worktree prune && git worktree add ../$1 master; }


# Optimized `replace` for use in a git repository
greplace () { a=$1; b=$2; git grep --files-with-matches "$a" | xargs sed -i -- s/$a/$b/g; }

# Rename files in git directory
grename () { a=$1; b=$2; for old_file in $(git ls-files "*$a*"); do new_file=$(echo $old_file | sed -En "s/$a/$b/p"); git mv -f $old_file $new_file; done; }
2 changes: 2 additions & 0 deletions navigation.bash
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ declare -A nav_keys=(
[cdp2os]=$CDP2OS
[mmx]=$MMX
[bash]=$BASH
[cpub]=$CPUB
# notes
[notes]=$NOTES
[work]=$WORK
Expand Down Expand Up @@ -52,6 +53,7 @@ declare -A script_keys=(
[inputrc]="$BASH_REPO/.inputrc_custom"
[android]="$BASH_REPO/android.bash"
[general]="$BASH_REPO/general.bash"
[nav]="$BASH_REPO/navigation.bash"
[git]="$BASH_REPO/git.bash"
[main]="$BASH_REPO/main.bash"
[vars]="$BASH_REPO/variables.bash"
Expand Down
4 changes: 4 additions & 0 deletions specific.bash
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ alias err="//tkfiltoolbox/tools/839/1.7.2/x86/err "

alias updot="python $GIT_REPOS_WIN/updot/updot.py"


tracerpt_etl() { tracerpt $1.etl -of CSV -o $1.csv; }
parse_csv() { python $SCRIPTS_WIN\\parse_etl_csv.py $@ 2>&1; }

# Windows style newline characters can cause issues in Cygwin in certain files.
# Replacement for the command with the same. Removes trailing \r character
# that causes the error `'\r': command not found`
Expand Down
1 change: 1 addition & 0 deletions variables.bash
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ OS_CDP="$MS_OS/onecoreuap/windows/cdp"
CDP2OS="$GIT_REPOS/cdp2os"
MMX="$GIT_REPOS/Shell.MMX/android/components/AgentsAPI"
BASH="$GIT_REPOS/bash"
CPUB="$GIT_REPOS/cpubwin-project-rome"

######### DEPENDENT ON WHAT DIR YOU'RE IN ########

Expand Down

0 comments on commit a77a442

Please sign in to comment.