tangled
alpha
login
or
join now
selman.me
/
rc.d
0
fork
atom
this repo has no description
0
fork
atom
overview
issues
pulls
pipelines
.config/fish/conf.d: add wasi-sdk,shpool
Selman Kayrancioglu
5 months ago
f535aade
b6ee0674
+43
2 changed files
expand all
collapse all
unified
split
private_dot_config
private_fish
conf.d
020-wasi-sdk.fish
022-shpool.fish
+9
private_dot_config/private_fish/conf.d/020-wasi-sdk.fish
···
1
1
+
set -l sdk_version "25.0"
2
2
+
set -l sdk_path "$HOME/opt/wasi-sdk/$sdk_version"
3
3
+
4
4
+
if not test -d "$sdk_path"
5
5
+
return
6
6
+
end
7
7
+
8
8
+
set -gx WASI_SDK_PATH "$sdk_path"
9
9
+
set -gx WASI_SDK_CC "$WASI_SDK_PATH/bin/clang --sysroot=$WASI_SDK_PATH/share/wasi-sysroot"
+34
private_dot_config/private_fish/conf.d/022-shpool.fish
···
1
1
+
if not status is-interactive
2
2
+
return
3
3
+
end
4
4
+
5
5
+
if not command -q shpool
6
6
+
return
7
7
+
end
8
8
+
9
9
+
set -l config_dir "$HOME/.config/shpool"
10
10
+
set -l app_support_dir "$HOME/Library/Application Support/shpool"
11
11
+
set -l app_support_config "$app_support_dir/config.toml"
12
12
+
13
13
+
if not test -d "$config_dir"
14
14
+
return
15
15
+
end
16
16
+
17
17
+
if not test -d "$app_support_dir"
18
18
+
mkdir -p "$app_support_dir"
19
19
+
end
20
20
+
21
21
+
if not test -e "$app_support_config"
22
22
+
ln -s "$config_dir/config.toml" "$app_support_config"
23
23
+
return
24
24
+
end
25
25
+
26
26
+
if not test -L "$app_support_config"
27
27
+
return
28
28
+
end
29
29
+
30
30
+
set -l link_target (readlink "$app_support_config")
31
31
+
if test "$link_target" \!= "$config_dir/config.toml"
32
32
+
# Points somewhere else, don't touch it
33
33
+
return
34
34
+
end