mirror of
https://github.com/Matir/skel.git
synced 2026-05-25 21:19:09 -07:00
shellcheck fixes
This commit is contained in:
@@ -7,6 +7,7 @@ set -o errexit
|
|||||||
set -o shwordsplit 2>/dev/null || true # Make zsh behave like bash
|
set -o shwordsplit 2>/dev/null || true # Make zsh behave like bash
|
||||||
|
|
||||||
USER=${USER:-$(id -un)}
|
USER=${USER:-$(id -un)}
|
||||||
|
HOME=${HOME:-$(cd ~ && pwd)}
|
||||||
|
|
||||||
case $(uname) in
|
case $(uname) in
|
||||||
Linux)
|
Linux)
|
||||||
@@ -67,7 +68,7 @@ install_dotfile_dir() {
|
|||||||
${submodule_prune} \) \
|
${submodule_prune} \) \
|
||||||
-prune -o ${FINDTYPE} f -print | \
|
-prune -o ${FINDTYPE} f -print | \
|
||||||
while read -r dotfile ; do
|
while read -r dotfile ; do
|
||||||
local TARGET="${HOME}/.${dotfile#${SRCDIR}/}"
|
local TARGET="${HOME}/.${dotfile#"${SRCDIR}"/}"
|
||||||
mkdir -p "$(dirname "${TARGET}")"
|
mkdir -p "$(dirname "${TARGET}")"
|
||||||
ln -s -f "${dotfile}" "${TARGET}"
|
ln -s -f "${dotfile}" "${TARGET}"
|
||||||
done
|
done
|
||||||
@@ -75,7 +76,7 @@ install_dotfile_dir() {
|
|||||||
awk '{print $2}' | \
|
awk '{print $2}' | \
|
||||||
while read -r submodule ; do
|
while read -r submodule ; do
|
||||||
local FULLNAME="${BASEDIR}/${submodule}"
|
local FULLNAME="${BASEDIR}/${submodule}"
|
||||||
local TARGET="${HOME}/.${FULLNAME#${SRCDIR}/}"
|
local TARGET="${HOME}/.${FULLNAME#"${SRCDIR}"/}"
|
||||||
mkdir -p "$(dirname "${TARGET}")"
|
mkdir -p "$(dirname "${TARGET}")"
|
||||||
if test -L "${TARGET}" ; then
|
if test -L "${TARGET}" ; then
|
||||||
if [ "$(readlink "${TARGET}")" != "${FULLNAME}" ] ; then
|
if [ "$(readlink "${TARGET}")" != "${FULLNAME}" ] ; then
|
||||||
@@ -95,7 +96,7 @@ install_basic_dir() {
|
|||||||
local file
|
local file
|
||||||
find "${SRCDIR}" ${FINDTYPE} f -print | \
|
find "${SRCDIR}" ${FINDTYPE} f -print | \
|
||||||
while read -r file ; do
|
while read -r file ; do
|
||||||
local TARGET="${2}/${file#${SRCDIR}/}"
|
local TARGET="${2}/${file#"${SRCDIR}"/}"
|
||||||
mkdir -p "$(dirname "${TARGET}")"
|
mkdir -p "$(dirname "${TARGET}")"
|
||||||
ln -s -f "${file}" "${TARGET}"
|
ln -s -f "${file}" "${TARGET}"
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user