|
|
@@ -2,10 +2,11 @@
|
|
|
|
|
|
import errno
|
|
|
import os
|
|
|
+import pathlib
|
|
|
import sys
|
|
|
|
|
|
-dirname = os.path.dirname(__file__)
|
|
|
-if dirname[len(os.path.commonprefix([os.path.abspath(__file__), dirname])):] != '.':
|
|
|
+dirname = pathlib.Path(__file__).parent
|
|
|
+if dirname != pathlib.Path().cwd():
|
|
|
print('This script must be run from the dotfiles directory.')
|
|
|
sys.exit(1)
|
|
|
script = os.path.basename(__file__)
|