[macOS] Migrating python 2 scripts to python 3 (#5115)

This commit is contained in:
Aleksandr Chebotov
2022-02-24 20:05:24 +03:00
committed by GitHub
parent 009a1bea38
commit c2797f37cd
8 changed files with 9 additions and 18 deletions

View File

@@ -4,7 +4,7 @@
tee -a /usr/local/bin/change_hostname.sh > /dev/null <<\EOF
#!/bin/bash -e -o pipefail
name="Mac-$(python -c 'from time import time; print int(round(time() * 1000))')"
name="Mac-$(python3 -c 'from time import time; print(int(round(time() * 1000)))')"
scutil --set HostName "${name}.local"
scutil --set LocalHostName $name
scutil --set ComputerName "${name}.local"