mirror of
https://github.com/DictXiong/dotfiles.git
synced 2025-04-24 17:06:55 +08:00
logger.sh: not need to use uuid5
This commit is contained in:
parent
2b2254988c
commit
89c8383ed5
2
.github/workflows/test.yml
vendored
2
.github/workflows/test.yml
vendored
|
@ -58,7 +58,7 @@ jobs:
|
|||
- name: install dependencies
|
||||
run: |
|
||||
brew update
|
||||
brew install git python3 zsh curl e2fsprogs
|
||||
brew install git python3 zsh curl
|
||||
sudo pip3 install requests
|
||||
|
||||
- name: checkout repo
|
||||
|
|
|
@ -45,7 +45,7 @@ install_dependencies()
|
|||
;;
|
||||
"macos" )
|
||||
$SUDO brew update
|
||||
$SUDO brew install git zsh curl tmux vim util-linux e2fsprogs
|
||||
$SUDO brew install git zsh curl tmux vim util-linux
|
||||
;;
|
||||
"msys" )
|
||||
pacman -Syu
|
||||
|
|
|
@ -22,19 +22,20 @@ fi
|
|||
|
||||
init_uuid()
|
||||
{
|
||||
local raw_uuid
|
||||
if [[ -f /var/lib/dbus/machine-id ]]; then
|
||||
raw_uuid=$(cat /var/lib/dbus/machine-id)
|
||||
elif [[ -f /etc/machine-id ]]; then
|
||||
raw_uuid=$(cat /etc/machine-id)
|
||||
elif [[ -f ~/.config/dotfiles/uuid ]]; then
|
||||
raw_uuid=$(cat ~/.config/dotfiles/uuid)
|
||||
local uuid
|
||||
if [[ -f ~/.config/dotfiles/uuid ]]; then
|
||||
uuid=$(cat ~/.config/dotfiles/uuid)
|
||||
else
|
||||
if [[ -x $(command -v uuidgen) ]]; then
|
||||
uuid=$(uuidgen)
|
||||
elif [[ -f /proc/sys/kernel/random/uuid ]]; then
|
||||
uuid=$(cat /proc/sys/kernel/random/uuid)
|
||||
else
|
||||
fmt_fatal "unable to generate uuid"
|
||||
fi
|
||||
mkdir -p ~/.config/dotfiles
|
||||
raw_uuid=$(uuidgen)
|
||||
echo "$raw_uuid" > ~/.config/dotfiles/uuid
|
||||
echo "$uuid" > ~/.config/dotfiles/uuid
|
||||
fi
|
||||
uuid=$(uuidgen -n "cc23b903-1993-44eb-9c90-48bd841eeac3" -s -N "$raw_uuid")
|
||||
}
|
||||
|
||||
post_beacon()
|
||||
|
|
Loading…
Reference in New Issue
Block a user