dotfiles/.config/shell/updates

25 lines
931 B
Text
Raw Permalink Normal View History

2022-03-18 17:50:20 -07:00
#!/bin/sh
# This file is provided to ensure smooth updates between versions of these
# dotfiles. It is to be run after environment variables are set whenever the
# shell starts, and should be compatible with standard `sh`.
2022-09-17 19:13:10 -07:00
set -ue
2022-03-18 17:50:20 -07:00
# [3-18-22] Move Powerlevel 10k config file out of home directory
if [ -f ~/.p10k.zsh ] && ! [ -f "$P10K_CONFIG_LOCATION" ]; then
if mv ~/.p10k.zsh "$P10K_CONFIG_LOCATION"; then
echo "Update: Powerlevel 10k config file moved to $P10K_CONFIG_LOCATION"
else
echo "Update: Error: failed to move Powerlevel 10k config file to $P10K_CONFIG_LOCATION"
fi
2022-03-18 17:50:20 -07:00
fi
2022-09-17 19:13:10 -07:00
# [9-17-22] Prepare to replace symlink at ~/.profile with an actual file
if [ -h ~/.profile ]; then
if rm ~/.profile; then
echo "Update: Symlink at ~/.profile was removed (to be replaced by real file)"
else
echo "Update: Error: Failed to remove symlink at ~/.profile for replacing with real file."
fi
fi