Go based buildbot to build official Archlinux repos with x86-64 feature levels, -O3 and LTO
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
ALHP.GO/rm_chroot.py

18 lines
324 B

#!/usr/bin/env python3
import os
import sys
from pathlib import Path
SAVE_PATH = "/path/to/workdir"
try:
chroot_abs = Path(sys.argv[1]).resolve(True)
except:
print("path does not resolve")
sys.exit(1)
if str(chroot_abs).startswith(SAVE_PATH):
os.system("rm -rf " + str(chroot_abs))
else:
sys.exit(2)