mirror of
https://github.com/DictXiong/dotfiles.git
synced 2025-04-25 04:56:53 +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
|
- name: install dependencies
|
||||||
run: |
|
run: |
|
||||||
brew update
|
brew update
|
||||||
brew install git python3 zsh curl e2fsprogs
|
brew install git python3 zsh curl
|
||||||
sudo pip3 install requests
|
sudo pip3 install requests
|
||||||
|
|
||||||
- name: checkout repo
|
- name: checkout repo
|
||||||
|
|
|
@ -45,7 +45,7 @@ install_dependencies()
|
||||||
;;
|
;;
|
||||||
"macos" )
|
"macos" )
|
||||||
$SUDO brew update
|
$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" )
|
"msys" )
|
||||||
pacman -Syu
|
pacman -Syu
|
||||||
|
|
|
@ -22,19 +22,20 @@ fi
|
||||||
|
|
||||||
init_uuid()
|
init_uuid()
|
||||||
{
|
{
|
||||||
local raw_uuid
|
local uuid
|
||||||
if [[ -f /var/lib/dbus/machine-id ]]; then
|
if [[ -f ~/.config/dotfiles/uuid ]]; then
|
||||||
raw_uuid=$(cat /var/lib/dbus/machine-id)
|
uuid=$(cat ~/.config/dotfiles/uuid)
|
||||||
elif [[ -f /etc/machine-id ]]; then
|
|
||||||
raw_uuid=$(cat /etc/machine-id)
|
|
||||||
elif [[ -f ~/.config/dotfiles/uuid ]]; then
|
|
||||||
raw_uuid=$(cat ~/.config/dotfiles/uuid)
|
|
||||||
else
|
else
|
||||||
mkdir -p ~/.config/dotfiles
|
if [[ -x $(command -v uuidgen) ]]; then
|
||||||
raw_uuid=$(uuidgen)
|
uuid=$(uuidgen)
|
||||||
echo "$raw_uuid" > ~/.config/dotfiles/uuid
|
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
|
||||||
|
echo "$uuid" > ~/.config/dotfiles/uuid
|
||||||
fi
|
fi
|
||||||
uuid=$(uuidgen -n "cc23b903-1993-44eb-9c90-48bd841eeac3" -s -N "$raw_uuid")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
post_beacon()
|
post_beacon()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user