-
Notifications
You must be signed in to change notification settings - Fork 50
/
sh_profile
executable file
·21 lines (18 loc) · 1.12 KB
/
sh_profile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
alias pbcopy='xclip -selection clipboard'
alias pbpaste='xclip -selection clipboard -o'
if [[ -t 0 && -t 1 && -t 2 && "[$-]" = *i* ]]; then
user_profile="/nix/var/nix/profiles/per-user/"$(whoami)"/profile/etc/profile.d/nix.sh"
[[ -f "$user_profile" ]] || user_profile="${HOME}/.nix-profile/etc/profile.d/nix.sh"
[[ -f "$user_profile" ]] && ! type nix &>/dev/null && source "$user_profile"
if [[ -f "$user_profile" && -f mysql/mysql.pid && -d "$HOME/.cache/Cypress" ]] &&
ps -p "$(cat mysql/mysql.pid)" &>/dev/null; then
[[ "${inside_nix_shell:-}" = impure ]] || inside_nix_shell=impure exec nix develop
elif [[ -z "${inside_nix_shell:-}" ]]; then
cat >&2 <<:MESSAGE:
##################################################### INFO ######################################################
# Please run the following commands to prepare the working environment for this project:
$(grep -F '```bash' -B2 -A2 -m3 --color=no README.md | sed -e '/``/d' -e 's/^\([A-Z]\)/## \1/' -e 's/^--$//')
###################################################################################################################
:MESSAGE:
fi
fi