Skip to content

Commit

Permalink
new : pass generator, get latest branch, improve assistant words
Browse files Browse the repository at this point in the history
  • Loading branch information
srJones1 committed Aug 8, 2022
1 parent 5fe874d commit b61bcab
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
8 changes: 4 additions & 4 deletions assistant.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ assistant_home=$(dirname "$assistant_real_location");
export ASSISTANT_LOCATION=$assistant_real_location
export ASSISTANT_HOME=$assistant_home

echo "Hi sr, I am $assistant_name"

if [ -s $assistant_home/variables ]
then
export $(cat $assistant_home/variables | xargs)
else
echo "variables are empty sr. Don't forget to create it if you want to centralize some variables like folder locations, global users, etc"
echo "Sr. don't forget to create it if you want to centralize some variables like folder locations, global users, etc in this file $assistant_real_location/variables"
fi


echo "Hi sr, I am $assistant_name"

if [[ "$1" == "" ]]; then
echo "What Can I do for you? Tell me a command..."
echo "You don't enter a command. What Can I do for you?"
else

command_path=$assistant_home/private_commands/$1".sh"
Expand Down
3 changes: 3 additions & 0 deletions commands/latest_branch.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
git fetch
latest_branch=$(git for-each-ref --sort=-committerdate | head -n 1 | awk -F '/' '{ print $NF }')
echo "latest_branch: $latest_branch"
1 change: 1 addition & 0 deletions commands/pass_gen.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
date +%s | sha256sum | base64 | head -c $1 ; echo

0 comments on commit b61bcab

Please sign in to comment.