OSDN Git Service
(root)
/
instantos
/
instantOS.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
da047a8
)
improve defaultapps
author
paperbenni
<paperbenni@gmail.com>
Wed, 29 Jul 2020 11:14:07 +0000
(13:14 +0200)
committer
paperbenni
<paperbenni@gmail.com>
Wed, 29 Jul 2020 11:14:07 +0000
(13:14 +0200)
setup/defaultapps
patch
|
blob
|
history
diff --git
a/setup/defaultapps
b/setup/defaultapps
index
a99fd9d
..
772e824
100644
(file)
--- a/
setup/defaultapps
+++ b/
setup/defaultapps
@@
-21,7
+21,12
@@
setprogram() {
[ -e "$1" ] && rm "$1"
TEMPSETTING=$(iconf "$1:$2")
echo "setting $1 to $TEMPSETTING"
- ln -s "$(which "$TEMPSETTING")" ./"$1"
+ if command -v "$TEMPSETTING"; then
+ ln -s "$(which "$TEMPSETTING")" ./"$1"
+ else
+ echo "$TEMPSETTING" >"$1"
+ chmod +x "$1"
+ fi
}
setprogram terminal st