forked from pierremolinaro/python-makefile
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathz-copy-makefile.py
More file actions
executable file
·28 lines (22 loc) · 903 Bytes
/
z-copy-makefile.py
File metadata and controls
executable file
·28 lines (22 loc) · 903 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#! /usr/bin/env python
# -*- coding: UTF-8 -*-
#-----------------------------------------------------------------------------*
import sys, os, shutil, filecmp
#-----------------------------------------------------------------------------*
#--- Get script absolute path
scriptDir = os.path.dirname (os.path.abspath (sys.argv [0]))
os.chdir (scriptDir)
#--- Destinations
destinations = [
"/Volumes/dev-svn/dev-lpc2294/dev-files/python-scripts",
"/Volumes/dev-svn/galgas/libpm/python-makefiles",
"/Volumes/dev-svn/plm/embedded-sources"
]
#---
source = os.path.abspath (scriptDir + "/makefile.py")
for dest in destinations:
destPath = dest + "/makefile.py"
if (not os.path.exists (destPath)) or not filecmp.cmp (source, destPath) :
print "Updating '" + destPath + "'"
shutil.copyfile (source, destPath)
#-----------------------------------------------------------------------------*