mirror of
https://github.com/kazhala/dotbare
synced 2024-11-02 09:40:27 +00:00
fix(finit): don't alter user .gitignore during migration, no need
This commit is contained in:
parent
c983e916fe
commit
6b512699e0
@ -71,14 +71,6 @@ if [[ -z "${remote_url}" ]]; then
|
||||
else
|
||||
[[ ! -d "${DOTBARE_TREE}" ]] && mkdir -p "${DOTBARE_TREE}"
|
||||
cd "${DOTBARE_TREE}"
|
||||
if [[ -f ".gitignore" ]]; then
|
||||
pattern=$(basename "${DOTBARE_DIR}")
|
||||
pattern="^${pattern}$"
|
||||
exists=$(awk -v pattern="${pattern}" '{ if ($0 ~ pattern) { print $0; } }' .gitignore)
|
||||
[[ -z "${exists}" ]] && basename "${DOTBARE_DIR}" >> .gitignore
|
||||
else
|
||||
basename "${DOTBARE_DIR}" >> .gitignore
|
||||
fi
|
||||
git clone --bare "${remote_url}" "${DOTBARE_DIR}"
|
||||
if ! /usr/bin/git --git-dir "${DOTBARE_DIR}" --work-tree "${DOTBARE_TREE}" checkout 2> /dev/null; then
|
||||
echo "File checkout failed"
|
||||
|
Loading…
Reference in New Issue
Block a user