mirror of
https://github.com/whyour/qinglong.git
synced 2026-12-01 09:45:36 +08:00
修改 ql 和 task 命令生成逻辑
This commit is contained in:
1 parent
805a716033
commit
70f2bef5d2
3 files changed
+5
-28
No files matched your search
@@ -23,18 +23,21 @@ async function linkCommand() {
|
||||
{
|
||||
src: 'update.sh',
|
||||
dest: 'ql',
|
||||
tmp: 'ql_tmp',
|
||||
},
|
||||
{
|
||||
src: 'task.sh',
|
||||
dest: 'task',
|
||||
tmp: 'task_tmp',
|
||||
},
|
||||
];
|
||||
|
||||
for (const link of linkShell) {
|
||||
const source = path.join(config.rootPath, 'shell', link.src);
|
||||
const target = path.join(commandDir, link.dest);
|
||||
await rmPath(target);
|
||||
await fs.symlink(source, target);
|
||||
const tmpTarget = path.join(commandDir, link.tmp);
|
||||
await fs.symlink(source, tmpTarget);
|
||||
await fs.rename(tmpTarget, target);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user