Skip to content

Commit

Permalink
forgot to remove comment about mac address for unique id, and move (w…
Browse files Browse the repository at this point in the history
…hoami)@(hostname --short)-unique_id to a variable and use that for lines 61 & 62 (#72)
  • Loading branch information
Tylerjet authored Feb 29, 2024
1 parent 1640410 commit dd071c9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ fi
if [[ "$commit_email" != "" ]]; then
git config user.email "$commit_email"
else
# Use the MAC address to generate a unique identifier
unique_id=$(cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 7 | head -n 1)
git config user.email "$(whoami)@$(hostname --short)-$unique_id"
sed -i "s/^commit_email=.*/commit_email=\"$(whoami)@$(hostname --short)-$unique_id\"/" "$parent_path"/.env
user_email=$(whoami)@$(hostname --short)-$unique_id
git config user.email "$user_email"
sed -i "s/^commit_email=.*/commit_email=\"$user_email\"/" "$parent_path"/.env
fi

# Check if remote origin already exists and create if one does not
Expand Down

0 comments on commit dd071c9

Please sign in to comment.