浏览代码

Bug: Users had to be in the /util directory to run the script (#4228)

MechMerlin 6 年之前
父节点
当前提交
bef554d18b
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      util/new_keymap.sh

+ 1 - 1
util/new_keymap.sh

@@ -18,7 +18,7 @@ if [ -z "$USERNAME" ]; then
     exit 1
 fi
 
-cd ..
+cd "$(dirname "$0")/.."
 
 if [ ! -d "keyboards/$KB_PATH" ]; then
 	printf "Error! keyboards/%s does not exist!\n" "$KB_PATH"