Fixes for MacOS
This commit is contained in:
parent
a1c30cfcab
commit
cc00374c88
18
.startup.sh
18
.startup.sh
|
@ -5,8 +5,22 @@
|
|||
# For fish see ~/dotscripts/setup/fish and ~/.config/fish/config.fish
|
||||
|
||||
# Determine current running shell.
|
||||
# unix.stackexchange.com/questions/71121/ (comment by frostschutz)
|
||||
CURSHELL="$(sed -re 's/\x0.*//' /proc/$$/cmdline)"
|
||||
# https://unix.stackexchange.com/a/72475
|
||||
if test -n "$ZSH_VERSION"; then
|
||||
CURSHELL=zsh
|
||||
elif test -n "$FISH_VERSION"; then
|
||||
CURSHELL=fish
|
||||
elif test -n "$BASH_VERSION"; then
|
||||
CURSHELL=bash
|
||||
elif test -n "$KSH_VERSION"; then
|
||||
CURSHELL=ksh
|
||||
elif test -n "$FCEDIT"; then
|
||||
CURSHELL=ksh
|
||||
elif test -n "$PS3"; then
|
||||
CURSHELL=unknown
|
||||
else
|
||||
CURSHELL=sh
|
||||
fi
|
||||
|
||||
# Add the paths
|
||||
export PATH="$(~/bin/parse_addpath | sed 's/ /:/g'):$PATH"
|
||||
|
|
|
@ -1,18 +1,19 @@
|
|||
#!/usr/bin/env fish
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# TODO: Use aerc instead
|
||||
|
||||
# Stubbornly translates ~/.exportenvs to ~/.exportenvs.fish
|
||||
|
||||
echo "" > ~/.exportenvs.fish # clear the file
|
||||
|
||||
for fileline in (cat ~/.exportenvs | sed 's/#!.\+$/#!\/usr\/bin\/env fish/')
|
||||
set line (echo "$fileline" | sed 's/export //' | sed 's/#.\+//')
|
||||
if test -z "$line"
|
||||
while read fileline; do
|
||||
line=$(echo "$fileline" | sed 's/#. sed 's/export //' | sed 's/#\.\+//')
|
||||
if [ -z "$line" ]; then
|
||||
echo "Adding '$fileline' as-is"
|
||||
echo "$fileline" >> ~/.exportenvs.fish
|
||||
continue
|
||||
end
|
||||
set name (echo "$line" | sed 's/=.\+$//' | sed 's/^$//')
|
||||
set content (echo "$line" | sed 's/^.\+=//' | sed 's/\$(/(/')
|
||||
echo "Adding $name with $content"
|
||||
echo set -x "$name" $content >> ~/.exportenvs.fish
|
||||
end
|
||||
fi
|
||||
tline=$(echo "$line" | sed 's/=/ /')
|
||||
echo Adding "$tline"
|
||||
echo "set -x $tline" >> ~/.exportenvs.fish
|
||||
done < ~/.exportenvs
|
||||
|
|
|
@ -9,8 +9,8 @@ DEST=${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim"
|
|||
|
||||
if ! [[ -f "$DEST" ]]; then
|
||||
echo "installing vim-plug for nvim"
|
||||
sh -c 'curl -fLo "$DEST" --create-dirs \
|
||||
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
|
||||
curl -fLo "$DEST" --create-dirs \
|
||||
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
||||
echo "installing nvim plugins"
|
||||
nvim +PlugInstall +qall
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue