mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-12 18:45:13 +00:00
add ability to force update
This commit is contained in:
@@ -60,7 +60,7 @@ Usage:
|
|||||||
dotdrop import [-ldV] [-c <path>] [-p <profile>] <paths>...
|
dotdrop import [-ldV] [-c <path>] [-p <profile>] <paths>...
|
||||||
dotdrop compare [-V] [-c <path>] [-p <profile>]
|
dotdrop compare [-V] [-c <path>] [-p <profile>]
|
||||||
[-o <opts>] [--files=<files>]
|
[-o <opts>] [--files=<files>]
|
||||||
dotdrop update [-dV] [-c <path>] <path>
|
dotdrop update [-fdV] [-c <path>] <path>
|
||||||
dotdrop listfiles [-V] [-c <path>] [-p <profile>]
|
dotdrop listfiles [-V] [-c <path>] [-p <profile>]
|
||||||
dotdrop list [-V] [-c <path>]
|
dotdrop list [-V] [-c <path>]
|
||||||
dotdrop --help
|
dotdrop --help
|
||||||
@@ -178,7 +178,10 @@ def update(opts, conf, path):
|
|||||||
if opts['dry']:
|
if opts['dry']:
|
||||||
LOG.dry('would run: %s' % (' '.join(cmd)))
|
LOG.dry('would run: %s' % (' '.join(cmd)))
|
||||||
else:
|
else:
|
||||||
if LOG.ask('Overwrite \"%s\" with \"%s\"?' % (src, path)):
|
msg = 'Overwrite \"%s\" with \"%s\"?' % (src, path)
|
||||||
|
if opts['safe'] and not LOG.ask(msg):
|
||||||
|
return False
|
||||||
|
else:
|
||||||
run(cmd, raw=False, log=False)
|
run(cmd, raw=False, log=False)
|
||||||
LOG.log('\"%s\" updated from \"%s\".' % (src, path))
|
LOG.log('\"%s\" updated from \"%s\".' % (src, path))
|
||||||
return True
|
return True
|
||||||
|
|||||||
Reference in New Issue
Block a user