various fixes
[distro-setup] / gitslink
1 #!/bin/bash
2
3 source /a/bin/errhandle/err
4
5 e() { echo "$*"; "$@"; }
6 lnf() { /a/bin/lnf/lnf "$@"; }
7
8 shopt -s nullglob
9 shopt -s extglob
10
11 cd /a/bin
12 # if we didn't have just automated files, we could cleanup
13 # links to not executable files.
14 e rm -rf /a/exe
15
16 # sourcing instead of calling script changes runtime from .47s to .36s
17 source /a/bin/lnf/lnf >/dev/null ||:
18
19 for x in !(unused|unfinished|queue|bash-template|buildscripts|crons|data|examples|log-quiet); do
20 [[ -e $x/.git ]] || continue
21 for y in $x/*; do
22 if [[ -x $y && ! -d $y ]]; then
23 lnf -v /a/bin/$y /a/exe
24 fi
25 done
26 done
27
28 for x in *; do
29 if [[ ! -d $x && -x $x ]]; then
30 lnf -v /a/bin/$x /a/exe
31 fi
32 done
33
34 # things we don't want to run in /a, because
35 # they are long running and could get in the way of
36 # btrfs remounting
37 /a/bin/distro-setup/install-my-scripts
38 /a/bin/log-quiet/setup