~johanvandegriff/unix-shell-programming-revised-edition-programs

unix-shell-programming-revised-edition-programs/create_link -rw-r--r-- 219 bytes
fc214385Johan Vandegriff added other old scripts, some newer ones too 1 year, 8 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/bash
path="$1"
name=`basename "$path"`
type="file"
test -d "$path" && type="folder"

linkpath="$2/$name.desktop"

echo "[Desktop Entry]
Version=1.0
Type=Link
Name=$name
URL=file://$path
Icon=$type" > "$linkpath"