▖ ▃▀▄▄▖▄▄▖ ▀▖
# # usage: plash rm CONTAINER # Deletes the given container atomically. There are no guarantees of any # behaviour of running containers whose root file system was deleted. # # Parameters may be interpreted as build instruction.
import os import sys from shutil import rmtree from plash.utils import (die_with_usage, handle_build_args, mkdtemp, nodepath_or_die) handle_build_args() try: container = sys.argv except IndexError: die_with_usage() node = nodepath_or_die(container) tmp = mkdtemp() os.rename(node, tmp) rmtree(tmp)