mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 08:47:12 +03:00
16 lines
351 B
Python
Executable File
16 lines
351 B
Python
Executable File
#!/usr/bin/env python
|
|
#
|
|
# This used to be a simple sed call like:
|
|
#
|
|
# $ sed "s:$HGTMP:*HGTMP*:"
|
|
#
|
|
# But $HGTMP has ':' under Windows which breaks the sed call.
|
|
#
|
|
import sys, os
|
|
|
|
input = sys.stdin.read()
|
|
input = input.replace(os.sep, '/')
|
|
hgtmp = os.environ['HGTMP'].replace(os.sep, '/')
|
|
input = input.replace(hgtmp, '$HGTMP')
|
|
sys.stdout.write(input)
|