3 use_magnet_to_acquire_checksum_faster()
5 # ,--'' ~~~~~~~^^^~._ '.
6 # ,.-' ~~~~~~~~~~^^^^^~~~._._ \
7 # | /^^^^^| /^^^^^^^^\\ \ \
8 # ,/___ < o> < (OO) > _ \
10 # |(|-'^^;,- ,| __ ^~~^^^^^^^; |\
11 # \\` | <;_ __ |`--- ..-^^/- | ||
12 # \`-|Oq-.____`________~='^^|__,/ ' //
13 # \ || | | | | \ ..-;| / '/
14 # | ||#|#|the|==|game!|'^` |/' /'
15 # | \\\\^\***|***| \ ,,;' /
16 # | `-=\_\__\___\__..-' ,.- - ,/
17 # | . `-_ ------ _,-'^-'^,-'
18 # | `-._________..--''^,-''^
20 # `----------'^ PROBLEM?
22 magnet=`GIT_DIR="$git_src_repo/.git" git ls-files -s "$1"`
23 if [ -n "$magnet" ]; then
36 if [ x"$1/../$2" = x"$lastinfiles" ]; then
40 for _a_f in "$1" "$2"; do
42 */background_l2.tga|*/background_ingame_l2.tga)
47 if [ -n "$git_src_repo" ] && ! $_a_e; then
48 _a_s=`use_magnet_to_acquire_checksum_faster "${1#./}"`
50 _a_s=$_a_s`use_magnet_to_acquire_checksum_faster "${2#./}"`
53 _a_s=`git hash-object "$1"`
55 _a_s=$_a_s`git hash-object "$2"`
59 lastinfiles="$1/../$2"
79 if [ x"$fromfirst" = x"$tofirst" ]; then
86 from=$fromrest # now we can only hit the ../ path or the bottom one
90 # from has path, to does not
91 # we need a ../ component then try again
106 while IFS= read -r L; do
107 s=`acquire_checksum "$L"`
108 eval first=\$first_$s
109 if [ -n "$first" ]; then
110 first_r=`make_relative_path "$L" "$first"`
111 killed=$((`stat -c %s "$L"` + $killed))
112 ln -vsnf "$first_r" "$L"
117 echo "Killed $(($killed / 1048576)) MiB"