Skip to content

Commit

Permalink
patch
Browse files Browse the repository at this point in the history
  • Loading branch information
lbr38 committed Jan 2, 2024
1 parent 9e8ed1d commit 419f072
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-rpm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
mkdir -p $HOME/rpmbuild/SPECS
mkdir -p /etc/linupdate/modules
mkdir -p /opt/linupdate
mkdir -p /opt/linupdate/.src/
mkdir -p /opt/linupdate/functions/
mkdir -p /opt/linupdate/mods-available/
mkdir -p /opt/linupdate/mods-enabled/
mkdir -p /opt/linupdate/agents-available/
Expand All @@ -43,7 +43,7 @@ jobs:
- name: Copy files to include in the build
run: |
cp -r ${GITHUB_WORKSPACE}/src/* /opt/linupdate/.src/
cp -r ${GITHUB_WORKSPACE}/functions/* /opt/linupdate/functions/
cp -r ${GITHUB_WORKSPACE}/mods-available/* /opt/linupdate/mods-available/
cp -r ${GITHUB_WORKSPACE}/service/* /opt/linupdate/service/
cp ${GITHUB_WORKSPACE}/linupdate /opt/linupdate/linupdate
Expand Down
12 changes: 6 additions & 6 deletions linupdate
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ DATE_FULL=$(date +%d-%m-%Y_%Hh%M) # Today date in 'DD-MM-YYYY_
TIME=$(date +%H:%M) # Time in '00:00' format
TIME_FULL=$(date +%Hh%Mm%Ss) # Time in '00h00m00s' format
LINUPDATE="${BASE_DIR}/linupdate" # Main program
SRC_SIR="${BASE_DIR}/.src" # Source code directory
FUNCTIONS="${BASE_DIR}/functions" # Functions directory
LOGS_DIR="/var/log/linupdate" # Logs directory
ETC_DIR="/etc/linupdate" # Configuration files directory
CONF="${ETC_DIR}/linupdate.conf" # Main configuration file
Expand Down Expand Up @@ -112,15 +112,15 @@ mkdir -p "$MODULES_ENABLED_DIR"
mkdir -p "$AGENTS_ENABLED_DIR"
mkdir -p "$SERVICE_DIR"

# If source code dir does not exist then quit
if [ ! -d "$SRC_DIR" ];then
# If functions dir does not exist then quit
if [ ! -d "$FUNCTIONS" ];then
echo -e "[$YELLOW ERROR $RESET] Some linupdate core files are missing. You might reinstall linupdate."
exit 1
fi

# Sourcing all files inside .src dir
for SRC_FILE in $(ls -A1 "$SRC_DIR");do
source "$SRC_DIR/$SRC_FILE"
# Sourcing all files inside functions dir
for FUNCTION_FILE in $(ls -A1 "$FUNCTIONS");do
source "$FUNCTIONS/$FUNCTION_FILE"
done

# Check that system is valid before continue
Expand Down

0 comments on commit 419f072

Please sign in to comment.