Skip to content

Commit 26c6eba

Browse files
committed
install: Attempt to create folder before installing, fixes #6
Signed-off-by: 林博仁(Buo-ren, Lin) <[email protected]>
1 parent 73a8e8e commit 26c6eba

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

install.bash

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ declare -Ar META_RUNTIME_DEPENDENCIES_CRITICAL=(
5151
### These are the dependencies that are used later and also checked later
5252
declare -Ar META_RUNTIME_DEPENDENCIES=(
5353
["cp"]="${META_RUNTIME_DEPENDENCIES_DESCRIPTION_GNU_COREUTILS}"
54+
["install"]="${META_RUNTIME_DEPENDENCIES_DESCRIPTION_GNU_COREUTILS}"
5455
["tr"]="${META_RUNTIME_DEPENDENCIES_DESCRIPTION_GNU_COREUTILS}"
5556
)
5657

@@ -107,6 +108,9 @@ init() {
107108

108109
printf -- \
109110
'Installing template files...\n'
111+
install \
112+
--directory \
113+
"${XDG_TEMPLATES_DIR}"
110114
cp \
111115
--force \
112116
--verbose \
@@ -136,17 +140,21 @@ init() {
136140
elif [ "${answer}" == n ]; then
137141
break
138142
else
143+
local kde_template_install_dir="${HOME}/.local/share/templates"
139144
printf 'Configuring templates for KDE...\n'
145+
install \
146+
--directory \
147+
"${kde_template_install_dir}"
140148
cp \
141149
--force \
142150
--verbose \
143151
"${SDC_SOURCE_CODE_DIR}"/*.bash \
144-
"${HOME}/.local/share/templates"
152+
"${kde_template_install_dir}"
145153
cp \
146154
--force \
147155
--verbose \
148156
"${SDC_KDE_TEMPLATE_SETUP_DIR}"/*.desktop \
149-
"${HOME}/.local/share/templates"
157+
"${kde_template_install_dir}"
150158
break
151159
fi
152160
fi

0 commit comments

Comments
 (0)