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