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 33f9e95 commit c767e17
Show file tree
Hide file tree
Showing 28 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-deb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
mkdir -p /tmp/linupdate-build/DEBIAN
mkdir -p /tmp/linupdate-build/etc/linupdate/modules
mkdir -p /tmp/linupdate-build/opt/linupdate
mkdir -p /tmp/linupdate-build/opt/linupdate/.src/
mkdir -p /tmp/linupdate-build/opt/linupdate/src/
mkdir -p /tmp/linupdate-build/opt/linupdate/mods-available/
mkdir -p /tmp/linupdate-build/opt/linupdate/mods-enabled/
mkdir -p /tmp/linupdate-build/opt/linupdate/agents-available/
Expand All @@ -38,7 +38,7 @@ jobs:
- name: Copy files to include in the build
run: |
cp -r ${GITHUB_WORKSPACE}/src/* /tmp/linupdate-build/opt/linupdate/.src/
cp -r ${GITHUB_WORKSPACE}/src/* /tmp/linupdate-build/opt/linupdate/src/
cp -r ${GITHUB_WORKSPACE}/mods-available/* /tmp/linupdate-build/opt/linupdate/mods-available/
cp -r ${GITHUB_WORKSPACE}/service/* /tmp/linupdate-build/opt/linupdate/service/
cp ${GITHUB_WORKSPACE}/linupdate /tmp/linupdate-build/opt/linupdate/linupdate
Expand Down
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/functions/
mkdir -p /opt/linupdate/src/
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}/functions/* /opt/linupdate/functions/
cp -r ${GITHUB_WORKSPACE}/src/* /opt/linupdate/src/
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
FUNCTIONS="${BASE_DIR}/functions" # Functions directory
SRC_SIR="${BASE_DIR}/.src" # Source code 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 functions dir does not exist then quit
if [ ! -d "$FUNCTIONS" ];then
# If source code dir does not exist then quit
if [ ! -d "$SRC_DIR" ];then
echo -e "[$YELLOW ERROR $RESET] Some linupdate core files are missing. You might reinstall linupdate."
exit 1
fi

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

# Check that system is valid before continue
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit c767e17

Please sign in to comment.