mirror of
git://git.yoctoproject.org/yocto-autobuilder-helper.git
synced 2025-07-19 20:59:02 +02:00
shared-repo-unpack: fix mv calls
As the mv commands use a filename wildcard we need to tell check_call to execute through the shell so that the wildcard is expanded, rather than treat as a file name. Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
This commit is contained in:
parent
2591cb364b
commit
28cf55e5ab
|
@ -42,9 +42,11 @@ with open(repojson) as f:
|
||||||
if os.path.exists(targetdir) and len(os.listdir(targetdir)):
|
if os.path.exists(targetdir) and len(os.listdir(targetdir)):
|
||||||
trashdest = trashdir + "/" + target + "/" + str(int(time.time())) + '-' + str(random.randrange(100, 100000, 2))
|
trashdest = trashdir + "/" + target + "/" + str(int(time.time())) + '-' + str(random.randrange(100, 100000, 2))
|
||||||
utils.mkdir(trashdest)
|
utils.mkdir(trashdest)
|
||||||
subprocess.check_call(['mv', targetdir + '/*', trashdest])
|
subprocess.check_call('mv ' + targetdir + '/* ' + trashdest,
|
||||||
|
shell=True)
|
||||||
if len(os.listdir(targetdir)):
|
if len(os.listdir(targetdir)):
|
||||||
subprocess.check_call(['mv', targetdir +'/.[!.]*', trashdest])
|
subprocess.check_call('mv ' + targetdir + '/.[!.]* ' + trashdest,
|
||||||
|
shell=True)
|
||||||
|
|
||||||
for repo in sorted(repos.keys()):
|
for repo in sorted(repos.keys()):
|
||||||
if repo not in needrepos:
|
if repo not in needrepos:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user