Homework: cp-for-the-poor (2026-03-02)#

Requirements#

See Exercise: Copy A File

Work Environment#

Use the OS setup from 2026-02-2{3,4}: Prepare Work Environment. 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#

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.)

    $ 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:

    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:

    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 Exercise: Copy A File.