Fork me on GitHub
  ▖     
▃▀▄▄▖▄▄▖
 ▀▖     
        


#!/usr/bin/env python3
# usage: plash data [CMD1 [CMD2 ...]]
#
# Prints the location of the build data.
# if arguments are given, these arguments will be execed insite the build data.
#
#
# Example:
#
# $ plash data
# /home/myuser/.plashdata
#
# $ plash data cat config/union_taste
# unionfs-fuse

import os
import sys
from plash import utils

utils.handle_help_flag()

plash_data = utils.get_plash_data()
shell = utils.get_default_user_shell()
if not sys.argv[1:]:
    print(plash_data)
else:
    os.chdir(plash_data)
    os.execlp(sys.argv[1], sys.argv[1], *sys.argv[2:])