Created
April 18, 2018 05:32
-
-
Save laixintao/2a11d3be01cab9e47c54462e608dd029 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import subprocess | |
if __name__ == '__main__': | |
out = subprocess.check_output("find ~/.local/venvs/twine -type l | xargs ls -la | awk '{if ($11) print $9, $11}'", shell=True) | |
for line in out.decode().split('\n'): | |
if not line: | |
continue | |
target, old_source = line.split(' ') | |
new_source = old_source.replace('3.6.4_4', '3.6.5') | |
print("old_source: {}, new_source:{}, target: {}".format(old_source, new_source, target)) | |
subprocess.run("ln -sf {} {}".format(new_source, target), shell=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
not working