From c1476e3394f875f33834877a63f485ec6a6be8f6 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Wed, 16 Jun 2021 12:09:10 -0400 Subject: Add shell init scripts and host_groups (#3) * Add shell init scripts (templates) * Check for additional symbols * Handle missing PATH_MAX declaration (e.g. Ubuntu) * Install shell scripts into $PREFIX/share/init * Replace _INIT declaration with HOST_GROUP * Add scripts_dir and config_host_group struct elements to global 'multihome' * Fix count_substrings() returning wrong type * Refactor RSYNC_BIN to MULTIHOME_RSYNC_BIN * get_timestamp() no longer accepts a buffer as an argument * write_init_script() now uses scripts in $PREFIX/share/init/ to generate output files * Add user_host_group(), which allows grouping systems to a single home directory by way of regex pattern matching * strip_domainname() returns modified pointer, not new storage * Fix strip_domainname test * Create configuration directory if it does not exist * CI needs to install multihome and use the correct script * Always resolve argv[0] to absolute path --- .github/workflows/cmake.yml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to '.github/workflows/cmake.yml') diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 8b6ba9b..7488458 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -38,21 +38,26 @@ jobs: # Execute the build. You can specify a specific target with "--target " run: cmake --build . --config $BUILD_TYPE + - name: Install + working-directory: ${{runner.workspace}}/build + shell: bash + run: sudo make install + - name: Initialize home working-directory: ${{runner.workspace}}/build shell: bash - run: ./multihome -s + run: multihome -s - name: Unit Test working-directory: ${{runner.workspace}}/build shell: bash - run: ./multihome -t + run: multihome -t - name: Runtime Test working-directory: ${{runner.workspace}}/build shell: bash run: | - . ~/.multihome/init + . ~/.multihome/init.sh . /etc/profile . ~/.bash_profile @@ -86,3 +91,10 @@ jobs: test -f TESTFILE test -f .gitconfig test -L .gemrc + + echo + for x in topdir/.multihome/init.*; do + echo "Dumping $x ..." + cat "$x" + echo + done \ No newline at end of file -- cgit