-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
40 lines (32 loc) · 902 Bytes
/
Taskfile.yml
File metadata and controls
40 lines (32 loc) · 902 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
version: "3"
silent: true
tasks:
default:
- |
stow */
task list-softlinks
echo =============================
touch hardlinks.json
task create-hardlinks
create-hardlinks:
- |
file="hardlinks.json"
if [ ! -f "$file" ]; then
echo "hardlinks.json not found!"
exit 1
fi
jq -c '.[]' "$file" | while read -r item; do
src=$(echo "$item" | jq -r '.source')
tgt=$(echo "$item" | jq -r '.target')
tgt_expanded=$(eval echo "$tgt")
mkdir -p "$tgt_expanded"
filename=$(basename "$src")
ln -f "$src" "${tgt_expanded%/}/$filename"
echo "Linked $src -> ${tgt_expanded%/}/$filename"
done
list-softlinks:
- |
ls -l ~/.config/lsd/colors.yaml
ls -l ~/.config/lsd/config.yaml
ls -l ~/.config/micro/settings.json
ls -l ~/.config/starship.toml