Path: blob/master/src/smc_pyutil/smc_pyutil/first_steps.py
Views: 285
# This file is part of CoCalc: Copyright © 2023 Sagemath, Inc.1# License: AGPLv3 s.t. "Commons Clause" – read LICENSE.md for details23import os, shutil45def main():6path = os.path.join(os.environ['HOME'], 'first-steps')7if os.path.exists(path):8# nothing to do.9return1011ext = os.path.splitext(path)[1].lower()12template = os.path.join(os.path.dirname(os.path.realpath(__file__)),13'templates', 'first-steps')14if os.path.exists(template):15shutil.copytree(template, path)16return1718# No template found. Installation must be messed up badly.19raise RuntimeError("first steps template is not available")202122if __name__ == "__main__":23main()242526