iankelling.org
/
git
/
distro-setup
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
shellcheck, static usb ethnet addresses, fix vpn config
[distro-setup]
/
brc
diff --git
a/brc
b/brc
index a5c645c52c8fc309e86c20685e07bd4296263643..7731b9cdd7c0652302300b7571bb663c4b134726 100644
(file)
--- a/
brc
+++ b/
brc
@@
-2474,29
+2474,19
@@
skmodified() {
}
}
-# sk on all the files in current git repo
(except those excluded)
+# sk on all the files in current git repo
skgit() {
skgit() {
- local f toplevel orig_dir tmp
skip pattern
- local -a ls_files
excludes
sk_files
+ local f toplevel orig_dir tmp
+ local -a ls_files sk_files
toplevel=$(git rev-parse --show-toplevel)
if [[ $PWD != "$toplevel" ]]; then
orig_dir=$PWD
cd $toplevel
fi
toplevel=$(git rev-parse --show-toplevel)
if [[ $PWD != "$toplevel" ]]; then
orig_dir=$PWD
cd $toplevel
fi
- excludes=(
- 'disabled/*'
- )
- tmp=$(git ls-files | shuf)
+ # tracked & untracked files
+ tmp=$(git ls-files && git ls-files --others --exclude-standard)
mapfile -t ls_files <<<"$tmp"
for f in "${ls_files[@]}"; do
mapfile -t ls_files <<<"$tmp"
for f in "${ls_files[@]}"; do
- skip=false
- for pattern in "${excludes[@]}"; do
- if [[ $f == $pattern ]]; then
- skip=true
- break
- fi
- done
- if $skip; then continue; fi
if sk-p "$f"; then
sk_files+=("$f")
fi
if sk-p "$f"; then
sk_files+=("$f")
fi