Skip to content

Commit

Permalink
install: Attempt to create folder before installing, fixes #6
Browse files Browse the repository at this point in the history
Signed-off-by: 林博仁(Buo-ren, Lin) <[email protected]>
  • Loading branch information
brlin-tw committed May 5, 2018
1 parent 73a8e8e commit 26c6eba
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions install.bash
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ declare -Ar META_RUNTIME_DEPENDENCIES_CRITICAL=(
### These are the dependencies that are used later and also checked later
declare -Ar META_RUNTIME_DEPENDENCIES=(
["cp"]="${META_RUNTIME_DEPENDENCIES_DESCRIPTION_GNU_COREUTILS}"
["install"]="${META_RUNTIME_DEPENDENCIES_DESCRIPTION_GNU_COREUTILS}"
["tr"]="${META_RUNTIME_DEPENDENCIES_DESCRIPTION_GNU_COREUTILS}"
)

Expand Down Expand Up @@ -107,6 +108,9 @@ init() {

printf -- \
'Installing template files...\n'
install \
--directory \
"${XDG_TEMPLATES_DIR}"
cp \
--force \
--verbose \
Expand Down Expand Up @@ -136,17 +140,21 @@ init() {
elif [ "${answer}" == n ]; then
break
else
local kde_template_install_dir="${HOME}/.local/share/templates"
printf 'Configuring templates for KDE...\n'
install \
--directory \
"${kde_template_install_dir}"
cp \
--force \
--verbose \
"${SDC_SOURCE_CODE_DIR}"/*.bash \
"${HOME}/.local/share/templates"
"${kde_template_install_dir}"
cp \
--force \
--verbose \
"${SDC_KDE_TEMPLATE_SETUP_DIR}"/*.desktop \
"${HOME}/.local/share/templates"
"${kde_template_install_dir}"
break
fi
fi
Expand Down

0 comments on commit 26c6eba

Please sign in to comment.