more reorg
This commit is contained in:
4
bash.d/10-paths.sh
Normal file
4
bash.d/10-paths.sh
Normal file
@@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
export PATH="./node_modules/.bin;$PATH"
|
||||
export PATH="$HOME/.cargo/bin;$PATH"
|
||||
@@ -2,10 +2,5 @@
|
||||
|
||||
PROMPT_SUBMODULE="${SUBMODULES}/romkatv-gitstatus"
|
||||
|
||||
if ls -A "$PROMPT_SUBMODULE"; then
|
||||
git submodule init
|
||||
git submodule update
|
||||
fi
|
||||
|
||||
# shellcheck disable=SC1090
|
||||
source "$PROMPT_SUBMODULE/gitstatus.prompt.sh"
|
||||
|
||||
6
dotfiles/.angular-config.json
Normal file
6
dotfiles/.angular-config.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"version": 1,
|
||||
"cli": {
|
||||
"analytics": false
|
||||
}
|
||||
}
|
||||
51
setup.sh
51
setup.sh
@@ -1,34 +1,41 @@
|
||||
#!/bin/bash
|
||||
|
||||
OLD_PWD=$PWD
|
||||
timestamp=$(date '+%m%d%Y%H%M')
|
||||
|
||||
function finish {
|
||||
cd "$OLD_PWD" || exit;
|
||||
}
|
||||
|
||||
trap finish EXIT
|
||||
|
||||
# From aaronjensen/dotfiles
|
||||
DOTFILES=$( cd "$(dirname "${BASH_SOURCE[0]}")" && pwd || return)
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
F=$( pwd |sed -e "s#$HOME/\?##" )
|
||||
cd "$DOTFILES/dotfiles" || exit;
|
||||
|
||||
for P in *
|
||||
do
|
||||
# skip setup
|
||||
if [ "$P" = "setup.sh" ]; then continue; fi
|
||||
if [ "$P" = "README.md" ]; then continue; fi
|
||||
find . -maxdepth 1 -type f -printf "%f\0" | while IFS= read -r -d $'\0' P; do
|
||||
target="${HOME}/${P}"
|
||||
backup="${HOME}/${P}.orig.${timestamp}"
|
||||
|
||||
# ensure permissions
|
||||
chmod -R o-rwx,g-rwx "$P"
|
||||
# skip existing links
|
||||
if [ -h "$target" ]; then continue; fi
|
||||
|
||||
# skip existing links
|
||||
if [ -h "$HOME/.$P" ]; then continue; fi
|
||||
# move existing dir out of the way
|
||||
if [ -e "$target" ]; then
|
||||
if [ -e "$backup" ]; then
|
||||
echo "want to override $target but backup exists"
|
||||
continue;
|
||||
fi
|
||||
|
||||
# move existing dir out of the way
|
||||
if [ -e "$HOME/.$P" ]; then
|
||||
if [ -e "$HOME/__$P" ]; then
|
||||
echo "want to override $HOME/.$P but backup exists"
|
||||
continue;
|
||||
echo -n "Backup ${P}"
|
||||
mv -v "$target" "$backup"
|
||||
fi
|
||||
|
||||
echo -n "Backup "
|
||||
mv -v "$HOME/.$P" "$HOME/__$P"
|
||||
fi
|
||||
# create link
|
||||
ln -v -s "$PWD/$P" "$target"
|
||||
|
||||
# create link
|
||||
echo -n "Link "
|
||||
ln -v -s "$F/$P" "$HOME/.$P"
|
||||
# ensure permissions
|
||||
chmod -R o-rwx,g-rwx "$target"
|
||||
done
|
||||
|
||||
|
||||
Reference in New Issue
Block a user