-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstartup-scripts.sh
More file actions
executable file
·44 lines (41 loc) · 1.71 KB
/
Copy pathstartup-scripts.sh
File metadata and controls
executable file
·44 lines (41 loc) · 1.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/sh
#===============================================================================
#
# FILE: startup-scripts.sh
#
# USAGE: You can either run this script:
# ./startup-scripts.sh
# Or copy and paste the specific line on your custom script
#
# DESCRIPTION: Execute all .sh files on the directory
# ~/bin/startup-scripts/
# if the path exists. Then will search for files on
# ~/bin/startup-scripts-examples/
# Tip: you can also copy the contents of this file to some file
# that is executed by default on your terminal, like the
# ~/.bash_profile
#
# OPTIONS: ---
# REQUIREMENTS: ---
# BUGS: ---
# NOTES: ---
# AUTHOR: Emerson Rocha <rocha[at]ieee.org>, based on Patrick Blook work
# COMPANY: Etica.AI
# LICENSE: Public Domain
# VERSION: 1.0
# CREATED: 2020-10-20 05:58 UTC
# REVISION: ---
#===============================================================================
#### Custom additions from original ~/.profile, START __________________________
# Note: this code exists both on the my-git-repo/bin/startup-scripts.sh and
# my-git-repo/dotfiles/example/rocha/.bash_profile
# If ~/bin/startup-scripts/ (or ~/bin/startup-scripts-examples/) exists, we
# execute every .sh file there
if [ -d "$HOME/bin/startup-scripts" ];
then
run-parts --regex '.*sh$' "$HOME/bin/startup-scripts/"
elif [ -d "$HOME/bin/startup-scripts-examples" ];
then
run-parts --regex '.*sh$' "$HOME/bin/startup-scripts-examples/"
fi
#### Custom additions from original ~/.profile, END ____________________________