Homework: ``cp-for-the-poor`` (2026-03-02) ========================================== .. topic:: Information * Due date: 2026-03-09 * Git Upstream Repository: https://codeberg.org/jfasch/FH-STECE2024 Requirements ------------ See :doc:`/trainings/material/soup/linux/sysprog/file-io/basics-exercise-copy/exercise` Work Environment ---------------- Use the OS setup from :ref:`fh-2026-03-02-workenv`. Disregard the clone that you made on that day (you may just say ``rm -rf ~/My-Projects/FH-STECE2024``) - we will recreate the source from a different location, as described below. Create Fork ........... Fork the upstream repository by clicking about on the `upstream repo page `__. This will create a new repository on coderberg.org, under your account. That repo is a *fork* of the upstream, which makes it possible to send *pull requests* to the upstream maintainer. .. note:: Both terms, *fork* and *pull request*, are defined by the workflow that is implemented by codeberg.org. Git itself knows nothing about those. Clone And Build ............... * Clone that repository like you cloned upstream in :ref:`fh-2026-03-02-workenv`, only with a different URL * Build it as usual Add Your Submission ................... * In ``~/My-Projects/FH-STECE2024/exercises/cp-for-the-poor/``, create a subdirectory for your submission. (Let ``my-codeberg-name`` be your account name on codeberg.org.) .. code-block:: console $ pwd /home/jfasch/My-Projects/FH-STECE2024/exercises/cp-for-the-poor $ cp -r _codebergaccountname_ my-codeberg-name * Add the subdirectory to the build, by adding a line to ``CMakeLists.txt``: .. code-block:: cmake add_subdirectory(_codebergaccountname_) # <-- template directory to copy from add_subdirectory(my-codeberg-name) # <-- my own workspace directory * In ``my-codeberg-name/CMakeLists.txt``, change the program name to not conflict with the original: .. code-block:: cmake add_executable(cp-for-the-poor.my-codeberg-name cp-for-the-poor.cpp) Implement ......... Now time is right to implement - in ``my-codeberg-name/`` - what's required in :doc:`/trainings/material/soup/linux/sysprog/file-io/basics-exercise-copy/exercise`.