parent
b8e889875e
commit
b042cb25fc
@ -1,21 +1,21 @@ |
|||||||
recording_banner() { |
recording_banner() { |
||||||
if [ $(ps -C obs | wc -l) == "2" ]; then |
if [ $(ps -C obs | wc -l) == "2" ]; then |
||||||
# if [ -x /opt/profiles/custom_aliases/host_of_show.sh ]; then |
if [ -f ~/.data/host_of_show.txt ]; then |
||||||
# /opt/profiles/custom_aliases/host_of_show.sh |
cat ~/.data/host_of_show.txt |
||||||
# fi |
fi |
||||||
echo -ne "\033[1;34mRecording on\033[5;33m:\033[0;0m\033[2;37m "; |
echo -ne "\033[1;34mRecording on\033[5;33m:\033[0;0m\033[2;37m "; |
||||||
# print date and time |
# print date and time |
||||||
date +"%A, %B %-d, %Y %r" |
date +"%A, %B %-d, %Y %r" |
||||||
echo -ne "\033[0m\033[37m" |
echo -ne "\033[0m\033[37m" |
||||||
else |
else |
||||||
# if [ -x /opt/profiles/custom_aliases/banner.sh ]; then |
if [ -f ~/.data/banner.txt ]; then |
||||||
# /opt/profiles/custom_aliases/banner.sh |
cat ~/.data/banner.txt |
||||||
# fi |
fi |
||||||
echo -ne "\033[0m\033[37m" |
echo -ne "\033[0m\033[37m" |
||||||
date +"%A, %B %-d, %Y %r" |
date +"%A, %B %-d, %Y %r" |
||||||
fi |
fi |
||||||
} |
} |
||||||
recording_banner |
recording_banner |
||||||
|
|
||||||
alias mysite='clear; cat /opt/profiles/mysite.txt; recording_banner' |
alias mysite='clear; cat ~/.data/mysite.txt; recording_banner' |
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,13 @@ |
|||||||
|
$ alias-help |
||||||
|
|
||||||
|
$ sshto work |
||||||
|
$ sshto home |
||||||
|
|
||||||
|
# Example Proxy Server Port Forwarding |
||||||
|
nano ~/.ssh/EXAMPLEconfigs_proxy.conf |
||||||
|
|
||||||
|
# GUI git project auto updater.... |
||||||
|
$ gp |
||||||
|
|
||||||
|
# GUI git project Change DIR - Note: RUN gp @ least once before...this. |
||||||
|
$ gpcd |
||||||
@ -0,0 +1,44 @@ |
|||||||
|
#!/bin/bash |
||||||
|
if [ ! -x /bin/mlocate ] && [ ! -x /usr/bin/mlocate ] \ |
||||||
|
&& [ ! -x /bin/locate ] && [ ! -x /usr/bin/locate ]; then |
||||||
|
echo "Install mlocate system package" |
||||||
|
exit 1 |
||||||
|
fi |
||||||
|
|
||||||
|
if [ ! -x /bin/sed ] && [ ! -x /usr/bin/sed ]; then |
||||||
|
echo "Install sed system package" |
||||||
|
exit 1 |
||||||
|
fi |
||||||
|
|
||||||
|
if [ ! -x /bin/awk ] && [ ! -x /usr/bin/awk ]; then |
||||||
|
echo "Install awk system package" |
||||||
|
exit 1 |
||||||
|
fi |
||||||
|
|
||||||
|
if [ -x /usr/bin/updatedb ] || [ -x /bin/updatedb ]; then |
||||||
|
echo "Updating dbsearch cache for git projects to be fresh...." |
||||||
|
sudo updatedb |
||||||
|
fi |
||||||
|
|
||||||
|
if [ -x /bin/mlocate ] || [ -x /usr/bin/mlocate ]; then |
||||||
|
list=$(mlocate '*/.git') |
||||||
|
elif [ -x /bin/locate ] || [ -x /usr/bin/locate ]; then |
||||||
|
list=$(locate '*/.git') |
||||||
|
fi |
||||||
|
|
||||||
|
#Set the field separator to new line |
||||||
|
OLD_IFS=$IFS |
||||||
|
IFS=$'\n' |
||||||
|
|
||||||
|
git_prj=/tmp/gitprojects |
||||||
|
echo "#Name,Path_to_project,short desc." > $git_prj |
||||||
|
for item in $list |
||||||
|
do |
||||||
|
PP=${item///.git/} |
||||||
|
NAME=$(echo "$PP" | awk -F'/' '{print $(NF)}') |
||||||
|
echo "${NAME},${PP}," >> $git_prj |
||||||
|
done |
||||||
|
|
||||||
|
IFS=$OLD_IFS |
||||||
|
|
||||||
|
nano $git_prj |
||||||
Loading…
Reference in new issue