aboutsummaryrefslogtreecommitdiffstats
path: root/build/scripts/move.py
blob: d710c493cddeddc6da6d8a150058bd412d96d017 (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()