Cleaned up, changed some paths

This commit is contained in:
NotAlexNoyle committed 2018-01-01 16:39:19 -05:00
1 parent fec898fdab
commit 3f44b8e29c
1 file changed
+91 -33
+91 -33
View File
@@ -1,13 +1,10 @@
# Path additions
# Add dict library to path
# Add homebrew dependencies to path
export PATH="/usr/local/sbin:$PATH"
# Use latest versions of git, openssh, openssl, and more
export PATH="/usr/local/bin:$PATH"
# Use latest python2 from homebrew
# Use latest python2 from homebrew when invoking "python"
export PATH="/usr/local/opt/python/libexec/bin:$PATH"
# Add sqlite3 to path
@@ -21,10 +18,10 @@ export PATH="$PATH:/opt/etcher-cli"
# Export mozilla build tools directory to custom folder
export MOZBUILD_STATE_PATH="/Users/NotAlexNoyle/Downloads/Code/Mozilla/.mozbuild"
export MOZBUILD_STATE_PATH='/Users/NotAlexNoyle/Downloads/Code/Mozilla/.mozbuild'
# Tell mozilla build system where configuration file is
export MOZCONFIG="/Users/NotAlexNoyle/Downloads/Code/Mozilla/src/mozilla-central/mozconfig"
export MOZCONFIG='/Users/NotAlexNoyle/Downloads/Code/Mozilla/src/mozilla-central/mozconfig'
# Set python version for pyenv in compliance with Mozilla's bootstrap.py
# export PYENV_VERSION=2.7.11
@@ -33,21 +30,25 @@ export MOZCONFIG="/Users/NotAlexNoyle/Downloads/Code/Mozilla/src/mozilla-central
# cd shortcuts
# Shortcut to Bash code working directory
export bash='/Users/NotAlexNoyle/Downloads/Code/Bash'
export BASH='/Users/NotAlexNoyle/Downloads/Code/Bash'
# Misc. programming working directory
export code=/Users/NotAlexNoyle/Downloads/Code
export CODE=/Users/NotAlexNoyle/Downloads/Code
export code='/Users/NotAlexNoyle/Downloads/Code'
export CODE='/Users/NotAlexNoyle/Downloads/Code'
# Normal macOS downloads folder /User/$YOU/Downloads
export downloads=/Users/NotAlexNoyle/Downloads
export DOWNLOADS=/Users/NotAlexNoyle/Downloads
export downloads='/Users/NotAlexNoyle/Downloads'
export DOWNLOADS='/Users/NotAlexNoyle/Downloads'
# theos iOS Jailbreak SDK from https://github.com/theos/theos
export theos=/Users/NotAlexNoyle/Downloads/IOS/theos
export THEOS=/Users/NotAlexNoyle/Downloads/IOS/theos
export theos='/Users/NotAlexNoyle/Downloads/Operating-Systems/Mobile/iOS/theos'
export THEOS='/Users/NotAlexNoyle/Downloads/Operating-Systems/Mobile/iOS/theos'
# Development directory for jailbreak tweaks
export tweaks=/Users/NotAlexNoyle/Downloads/Code/JailbreakTweaks
export TWEAKS=/Users/NotAlexNoyle/Downloads/Code/JailbreakTweaks
export tweaks='/Users/NotAlexNoyle/Downloads/Code/JailbreakTweaks'
export TWEAKS='/Users/NotAlexNoyle/Downloads/Code/JailbreakTweaks'
# Bash aliases
@@ -69,9 +70,9 @@ alias CLS='clear'
alias cpdir='cp -R '
alias CPDIR='cp -R '
# iOS deviceconsole executer, binary from https://github.com/rpetrich/deviceconsole
alias deviceconsole='cd /Users/NotAlexNoyle/Downloads/IOS/deviceconsole/ && ./deviceconsole ; cd ~-'
alias DEVICECONSOLE='cd /Users/NotAlexNoyle/Downloads/IOS/deviceconsole/ && ./deviceconsole ; cd ~-'
# Execute iOS deviceconsole (binary from https://github.com/rpetrich/deviceconsole)
alias deviceconsole='(cd /Users/NotAlexNoyle/Downloads/Operating-Systems/Mobile/iOS/deviceconsole && ./deviceconsole)'
alias DEVICECONSOLE='(cd /Users/NotAlexNoyle/Downloads/Operating-Systems/Mobile/iOS/deviceconsole && ./deviceconsole)'
# List git files in repo
alias gitls='git ls-tree --full-tree -r HEAD'
@@ -90,8 +91,8 @@ alias ls='ls -a'
alias LS='ls -a'
# theos iOS Jailbreak SDK new instance executer
alias newtweak='$theos/bin/nic.pl'
alias newtweak='$theos/bin/nic.pl'
alias newtweak='/Users/NotAlexNoyle/Downloads/Operating-Systems/Mobile/iOS/theos/bin/nic.pl'
alias NEWTWEAK='/Users/NotAlexNoyle/Downloads/Operating-Systems/Mobile/iOS/theos/bin/nic.pl'
# Open file in notepad.app from Mac App Store
alias notepad='open -a "/Applications/Notepad.app" '
@@ -101,6 +102,10 @@ alias NOTEPAD='open -a "/Applications/Notepad.app" '
alias photoshop='open -a "Adobe Photoshop CC 2017" '
alias PHOTOSHOP='open -a "Adobe Photoshop CC 2017" '
# Upgrade all pip packages (requires pip-review)
alias pipupgrade='pip-review --auto --verbose'
alias PIPUPGRADE='pip-review --auto --verbose'
# Generate speedtest results with share link every time
alias speedtest='speedtest --share'
alias SPEEDTEST='speedtest --share'
@@ -150,7 +155,6 @@ caskchk() {
fi
}
CASKCHK() {
caskChkCommand="$(brew cask outdated)"
@@ -168,24 +172,53 @@ CASKCHK() {
}
# Creates a remote Github repo (using whiteinge/ok.sh)
# Creates a remote repository on github.com (using whiteinge/ok.sh)
gitinit() {
if [[ $# -eq 0 ]] ; then
echo "Please specify the name of the repo you wish to create."
elif [[ $# > 1 ]] ; then
echo "Too many arguments. Please specify ONLY the name of the repo you wish to create. Repository titles with more than one word should be separated by dashes, not by spaces or other special characters."
if [[ $# < 2 ]] ; then
echo "Please specify the username and title of the repo you wish to create. Example: "gitinit USERNAME TITLE""
elif [[ $# > 2 ]] ; then
echo "Too many arguments. Please specify only the username and title of the repo you wish to create. Example: "gitinit USERNAME TITLE" Titles with more than one word should be separated by dashes, not by spaces or other special characters."
else
cd /Users/NotAlexNoyle/Downloads/Code/Bash/ok.sh > /dev/null
./ok.sh create_repo $1 2> ~/.create_repo_output > /dev/null
cd /Users/NotAlexNoyle/Downloads/Code/Bash/ok.sh
./ok.sh create_repo $1 2> ~/.create_repo_output > /dev/null
repoOutput=$(cat ~/.create_repo_output)
if [[ $repoOutput == Client* ]] || [[ $repoOutput == Server* ]] ; then
if [[ $repoOutput == Client* ]] || [[ $repoOutput == Server* ]] ; then
echo
cat ~/.create_repo_output
echo
echo Repository Not Created.
echo "Repository Not Created."
echo
else
echo
echo "Repository \"https://github.com/NotAlexNoyle/$1\" successfully created."
echo
fi
rm -rf ~/.create_repo_output
cd - > /dev/null
fi
}
GITINIT() {
if [[ $# < 1 ]] ; then
echo "Please specify the name of the repo you wish to create."
elif [[ $# > 1 ]] ; then
echo "Too many arguments. Please specify ONLY the name of the repo you wish to create. Repository titles with more than one word should be separated by dashes, not by spaces or other special characters."
else
cd /Users/NotAlexNoyle/Downloads/Code/Bash/ok.sh
./ok.sh create_repo $1 2> ~/.create_repo_output > /dev/null
repoOutput=$(cat ~/.create_repo_output)
if [[ $repoOutput == Client* ]] || [[ $repoOutput == Server* ]] ; then
echo
cat ~/.create_repo_output
echo
echo "Repository Not Created"
echo
else
echo
@@ -199,10 +232,35 @@ gitinit() {
}
# Searches the current directory, with the option to pass in a different directory to search instead
# Removes a remote repository from github.com (using whiteinge/ok.sh)
gitrm() {
search() {
if [[ $# < 2 ]] ; then
echo "Please specify the name of the repo you want to delete. Example: 'gitrm USERNAME REPONAME'"
elif [[ $# > 2 ]] ; then
echo "Too many arguments. Please specify ONLY the name of the repo you want to delete. Example: 'gitrm USERNAME REPONAME'"
else
cd /Users/NotAlexNoyle/Downloads/Code/Bash/ok.sh
yes | ./ok.sh delete_repo $1 2> ~/.delete_repo_output > /dev/null
#todo
repoOutput=$(cat ~/.delete_repo_output)
if [[ $repoOutput != null ]] ; then
echo "Errors found: "
cat ~/.repoOutput
else
echo "Output was null"
fi
rm -rf ~/.delete_repo_output
cd - > /dev/null
fi
}
# Searches the current directory, with the option to pass in a different directory to search instead
search() {
echo "TODO"
}