Merge pull request #257 from JustEnoughLinuxOS/dev
Merge to main for release.
This commit is contained in:
commit
a753e711e9
8 changed files with 111 additions and 15 deletions
12
.github/workflows/release-dev.yaml
vendored
12
.github/workflows/release-dev.yaml
vendored
|
@ -42,14 +42,20 @@ jobs:
|
|||
release_notes="${release_notes//'%'/'%25'}"
|
||||
release_notes="${release_notes//$'\n'/'%0A'}"
|
||||
release_notes="${release_notes//$'\r'/'%0D'}"
|
||||
echo "::set-output name=changes::$(echo ${release_notes} | wc -l)"
|
||||
echo "::set-output name=release_notes::${release_notes}"
|
||||
echo ::set-output name=release_notes::${release_notes}
|
||||
|
||||
- name: change_counter
|
||||
id: counter
|
||||
run: |
|
||||
count="$(git log --after "$(date -d "yesterday" +%Y-%m-%d)" --pretty=format:"* %h: %s" | wc -l)"
|
||||
echo "::set-output name=count::${count}"
|
||||
|
||||
- name: Get date for artifacts
|
||||
id: date
|
||||
run: echo "::set-output name=date::$(date +'%Y%m%d%H%M')"
|
||||
|
||||
- name: Repository Dispatch
|
||||
if: steps.changes.outputs.changes != '0'
|
||||
if: steps.counter.outputs.count != '0'
|
||||
uses: peter-evans/repository-dispatch@v1
|
||||
with:
|
||||
token: ${{ secrets.REPO_ACCESS }}
|
||||
|
|
|
@ -38,6 +38,6 @@ sed -i 's|<gameList>|& \
|
|||
fi
|
||||
fi
|
||||
|
||||
mv /storage/roms/ports/JelosAddOns/JelosAddOns.sh /storage/roms/ports/JelosAddOns/JelosAddOns
|
||||
mv /storage/roms/ports/JelosAddOns/JelosAddOns.sh /storage/roms/ports/JelosAddOns.sh
|
||||
chmod +x /storage/roms/ports/JelosAddOns/JelosAddOns.sh
|
||||
chmod +x /storage/roms/ports/JelosAddOns -R
|
||||
|
|
|
@ -23,6 +23,7 @@ cp -f /usr/config/retroarch/retroarch-core-options.cfg /storage/.config/retroarc
|
|||
rm -rf /storage/roms/ports/JelosAddOns*
|
||||
cp -r /usr/share/JelosAddOns /storage/roms/ports/
|
||||
mv /storage/roms/ports/JelosAddOns/JelosAddOns.sh /storage/roms/ports/JelosAddOns.sh
|
||||
chmod +x /storage/roms/ports/JelosAddOns.sh
|
||||
rm -rf /storage/.config/modules/Drastic*
|
||||
|
||||
if [ -e /usr/config/ssh/authorized_keys ]; then
|
||||
|
|
79
packages/jelos/sources/scripts/rom_system_split
Normal file
79
packages/jelos/sources/scripts/rom_system_split
Normal file
|
@ -0,0 +1,79 @@
|
|||
#!/bin/bash
|
||||
|
||||
# rom_system_split: split your roms across your local and external storage
|
||||
|
||||
# prerequesites:
|
||||
# - store local roms must be stored in "/storage/roms_local"
|
||||
# - store external roms must be stored in "/storage/roms"
|
||||
# - you cannot spread the same system files across multiple locations.
|
||||
# if duplicate systems are found, local folders will take preference
|
||||
|
||||
LOCAL_FOLDER_NAME="roms_local"
|
||||
EXT_FOLDER_NAME="roms"
|
||||
|
||||
LOCAL_ROM_FOLDERS=$(
|
||||
ls -d ${LOCAL_FOLDER_NAME}/*/ |
|
||||
sed -e "s/${LOCAL_FOLDER_NAME}//g"
|
||||
)
|
||||
EXT_ROM_FOLDERS=$(
|
||||
ls -d ${EXT_FOLDER_NAME}/*/ |
|
||||
sed -e "s/${EXT_FOLDER_NAME}//g"
|
||||
)
|
||||
|
||||
ES_SYSTEMS="/storage/.emulationstation/es_systems.cfg"
|
||||
|
||||
ES_LIST=$(
|
||||
cat ${ES_SYSTEMS} |
|
||||
grep "<path>" |
|
||||
sed -e "s/<path>//g" -e "s/<\/path>//g" -e "s/\/storage\///g"
|
||||
)
|
||||
|
||||
|
||||
echo "LOCAL_FOLDER_NAME: ${LOCAL_FOLDER_NAME}"
|
||||
echo "EXT_FOLDER_NAME: ${EXT_FOLDER_NAME}"
|
||||
echo "EXT_STORAGE: ${EXT_STORAGE}"
|
||||
echo "EXTERNAL: ${EXTERNAL}"
|
||||
echo "LOCAL_ROM_FOLDERS: $LOCAL_ROM_FOLDERS{}"
|
||||
echo "EXT_ROM_FOLDERS: ${EXT_ROM_FOLDERS}"
|
||||
echo "ES_SYSTEMS: ${ES_SYSTEMS}"
|
||||
echo "ES_LIST: ${ES_LIST}"
|
||||
|
||||
|
||||
# required paramaters: local/external, rom folder list, es folder list
|
||||
update_es_folders() {
|
||||
folder_name=${LOCAL_FOLDER_NAME}
|
||||
orig_folder_name=${EXT_FOLDER_NAME}
|
||||
if [[ $1 == "external" ]]
|
||||
then
|
||||
folder_name=${EXT_FOLDER_NAME}
|
||||
orig_folder_name=${LOCAL_FOLDER_NAME}
|
||||
fi
|
||||
folder_array=( $2 )
|
||||
for folder in ${folder_array[@]}
|
||||
do
|
||||
system=${folder%?}
|
||||
# check that the system exists in ES
|
||||
if [[ $3 == *"${system}"* ]]
|
||||
then
|
||||
# skip if there are no files in the folder
|
||||
if [ -z "$(ls -A /storage/${folder_name}${system})" ]
|
||||
then
|
||||
continue
|
||||
fi
|
||||
# if the folder doesn't exist in ES, update the original
|
||||
if [[ $3 != *"${folder_name}${system}"* ]]
|
||||
then
|
||||
sed -i -e "s|<path>/storage/${orig_folder_name}${system}</path>|<path>/storage/${folder_name}${system}</path>|g" ${ES_SYSTEMS}
|
||||
fi
|
||||
fi
|
||||
done
|
||||
}
|
||||
systemctl stop emustation
|
||||
|
||||
# check the external folders first
|
||||
update_es_folders "external" "${EXT_ROM_FOLDERS}" "${ES_LIST}"
|
||||
# next check the local folders
|
||||
# if there are duplicate folders in EXTERNAL, LOCAL ones will take preference
|
||||
update_es_folders "local" "${LOCAL_ROM_FOLDERS}" "${ES_LIST}"
|
||||
|
||||
systemctl start emustation
|
|
@ -7,19 +7,21 @@ CONFIGPATH="/storage/.config"
|
|||
if [ -e "${CONFIGPATH}/rsync.conf" ]
|
||||
then
|
||||
source ${CONFIGPATH}/rsync.conf
|
||||
else
|
||||
MOUNTPATH="/storage/cloud"
|
||||
SYNCPATH="GAMES"
|
||||
BACKUPPATH="/storage/roms"
|
||||
fi
|
||||
|
||||
# If rsync.conf is missing variables set defaults
|
||||
MOUNTPATH="${MOUNTPATH:=/storage/cloud}"
|
||||
SYNCPATH="${SYNCPATH:=GAMES}"
|
||||
BACKUPPATH="${BACKUPPATH:=/storage/roms}"
|
||||
RSYNCOPTSBACKUP="${RSYNCOPTSBACKUP:=-raiv --prune-empty-dirs}"
|
||||
|
||||
echo -e "=> ${OS_NAME} CLOUD BACKUP UTILITY\n" >/dev/console
|
||||
|
||||
echo "Mounting ${MOUNTPATH}" >/dev/console 2>&1
|
||||
rclonectl mount ${MOUNTPATH} >/dev/console 2>&1
|
||||
|
||||
echo "Backing up data from ${BACKUPPATH} to ${MOUNTPATH}/${SYNCPATH}" >/dev/console 2>&1
|
||||
rsync -raiv --include-from="${CONFIGPATH}/rsync-rules.conf" --prune-empty-dirs ${BACKUPPATH}/ ${MOUNTPATH}/${SYNCPATH}/ >/dev/console 2>&1
|
||||
rsync ${RSYNCOPTSBACKUP} --include-from="${CONFIGPATH}/rsync-rules.conf" ${BACKUPPATH}/ ${MOUNTPATH}/${SYNCPATH}/ >/dev/console 2>&1
|
||||
|
||||
echo "Unmounting ${MOUNTPATH}" >/dev/console 2>&1
|
||||
rclonectl unmount ${MOUNTPATH} >/dev/console 2>&1
|
||||
|
|
|
@ -7,19 +7,21 @@ CONFIGPATH="/storage/.config"
|
|||
if [ -e "${CONFIGPATH}/rsync.conf" ]
|
||||
then
|
||||
source ${CONFIGPATH}/rsync.conf
|
||||
else
|
||||
MOUNTPATH="/storage/cloud"
|
||||
SYNCPATH="GAMES"
|
||||
BACKUPPATH="/storage/roms"
|
||||
fi
|
||||
|
||||
# If rsync.conf is missing variables set defaults
|
||||
MOUNTPATH="${MOUNTPATH:=/storage/cloud}"
|
||||
SYNCPATH="${SYNCPATH:=GAMES}"
|
||||
BACKUPPATH="${BACKUPPATH:=/storage/roms}"
|
||||
RSYNCOPTSRESTORE="${RSYNCOPTSRESTORE:=-raiv}"
|
||||
|
||||
echo -e "=> ${OS_NAME} CLOUD RESTORE UTILITY\n" >/dev/console
|
||||
|
||||
echo "Mounting ${MOUNTPATH}" >/dev/console 2>&1
|
||||
rclonectl mount ${MOUNTPATH} >/dev/console 2>&1
|
||||
|
||||
echo "Restoring data from ${MOUNTPATH}/${SYNCPATH} to ${BACKUPPATH}" >/dev/console 2>&1
|
||||
rsync -raiv --include-from="${CONFIGPATH}/rsync-rules.conf" ${MOUNTPATH}/${SYNCPATH}/ ${BACKUPPATH}/ >/dev/console 2>&1
|
||||
rsync ${RSYNCOPTSRESTORE} --include-from="${CONFIGPATH}/rsync-rules.conf" ${MOUNTPATH}/${SYNCPATH}/ ${BACKUPPATH}/ >/dev/console 2>&1
|
||||
|
||||
echo "Unmounting ${MOUNTPATH}" >/dev/console 2>&1
|
||||
rclonectl unmount ${MOUNTPATH} >/dev/console 2>&1
|
||||
|
|
|
@ -6,3 +6,9 @@ SYNCPATH="GAMES"
|
|||
|
||||
### This is the path we are backup up from.
|
||||
BACKUPPATH="/storage/roms"
|
||||
|
||||
### This allows changes to the rsync options for cloud_backup
|
||||
RSYNCOPTSBACKUP="-raiv --prune-empty-dirs"
|
||||
|
||||
### This allows changes to the rsync options for cloud_restore
|
||||
RSYNCOPTSRESTORE="-raiv"
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# Copyright (C) 2020-present Fewtarius
|
||||
|
||||
PKG_NAME="emulationstation"
|
||||
PKG_VERSION="523c1b7"
|
||||
PKG_VERSION="a80240c"
|
||||
PKG_GIT_CLONE_BRANCH="main"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
|
|
Loading…
Reference in a new issue