aboutsummaryrefslogtreecommitdiffstats
path: root/build/scripts/move.py
blob: 3f611fbc2e3fc28ba0f077a20ff839c9c5479acf (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import os
import sys

# /script/move.py <src-1> <tgt-1> <src-2> <tgt-2> ... <src-n> <tgt-n>
# renames src-1 to tgt-1, src-2 to tgt-2, ..., src-n to tgt-n.


def main():
    assert len(sys.argv) % 2 == 1
    for index in range(1, len(sys.argv), 2):
        os.rename(sys.argv[index], sys.argv[index + 1])


if __name__ == '__main__':
    main()