mirror of
https://github.com/sorin-ionescu/prezto.git
synced 2025-02-02 23:02:15 +08:00
adds rudimentary install script
This commit is contained in:
parent
d43bcb9720
commit
87e8ef43a0
31
install.zsh
Normal file
31
install.zsh
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
#
|
||||||
|
# Install Prezto by creating a bunch of symlinks.
|
||||||
|
#
|
||||||
|
# Authors:
|
||||||
|
# Adrien Bak <adrien.bak@gmail.com>
|
||||||
|
#
|
||||||
|
|
||||||
|
#get the folder containing this script
|
||||||
|
install_folder=${0:a:h}
|
||||||
|
|
||||||
|
setopt EXTENDED_GLOB
|
||||||
|
|
||||||
|
if [[ $1 == "--dry-run" ]]; then
|
||||||
|
dryrun=true
|
||||||
|
echo 'Dry-Run'
|
||||||
|
else
|
||||||
|
dryrun=false
|
||||||
|
fi
|
||||||
|
|
||||||
|
for rcfile in "${install_folder}"/runcoms/^README.md(.N); do
|
||||||
|
target="$rcfile"
|
||||||
|
symlink="${ZDOTDIR:-$HOME}/.${rcfile:t}"
|
||||||
|
|
||||||
|
if $dryrun ; then
|
||||||
|
echo "${symlink} --> ${target}"
|
||||||
|
else
|
||||||
|
ln -s ${target} ${symlink}
|
||||||
|
fi
|
||||||
|
|
||||||
|
done
|
||||||
|
|
Loading…
Reference in New Issue
Block a user