This repository has been archived by the owner on Jul 25, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from silvio/sfr/private-extensions
add script to include apps in owncloud
- Loading branch information
Showing
3 changed files
with
80 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
|
||
# configfile for extensions.sh | ||
# one line with separator "!" for ... | ||
# NAME = Short text | ||
# CMDLINE = A small line to install and to do all shell things, separate this | ||
# with a ";". No multiline supported currently | ||
|
||
# 1NAME!2CMDLINE | ||
|
||
# example: remove the first comment char "#" | ||
|
||
## tools for installation | ||
#tool installation!apt-get install -y git-core curl | ||
# | ||
### apps | ||
## sms sync | ||
#ownCloud SMS!git clone https://github.com/nerzhul/ocsms.git --branch=stable | ||
# | ||
## youtubedl - with some manipulation things | ||
#Youtube Downloader depencies!apt-get install -y libav-tools python | ||
#Youtube Downloader Binary!curl https://yt-dl.org/downloads/2015.01.25/youtube-dl -o /usr/bin/youtube-dl ; chmod a+x /usr/bin/youtube-dl | ||
#Youtube Downloader App!git clone https://github.com/shibby/owncloud-youtubedl.git ; mv owncloud-youtubedl/youtubedl .; rm -rf owncloud-youtubedl | ||
# | ||
## this tools are not used anymore | ||
#tool remove;apt-get remove -y git-core curl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#!/usr/bin/env bash | ||
|
||
EXTCONF="${1}" | ||
EXTAPPDIR="${2}" | ||
|
||
if [ ! -d "${EXTAPPDIR}" ]; then | ||
echo "app dir not located ad ${EXTAPPDIR}. Exit processing of extensions.sh" | ||
exit 1 | ||
fi | ||
|
||
pushd "${EXTAPPDIR}" | ||
|
||
if [ ! -e "${EXTCONF}" ]; then | ||
echo "extconf doesn exists at ${EXTCONF}. Exit processing of extensions.sh" | ||
exit 1 | ||
fi | ||
|
||
while read line | ||
do | ||
# filter empty and commented lines | ||
[ "${line}" == "" ] && continue | ||
[ "${line:0:1}" == "#" ] && continue | ||
|
||
# parsing | ||
IFS="!" read -ra entry <<< "${line}" | ||
|
||
NAME="${entry[0]}" | ||
CMDL="${entry[1]}" | ||
|
||
echo "" | ||
echo "-=> work on ... ${NAME} " | ||
|
||
# yea - its secure nightmare here, but we call this only in a docker | ||
# container at buildtime | ||
if [ ! -z "${CMDL}" ]; then | ||
while IFS=";" read -ra cmdarr; do | ||
for cmd in "${cmdarr[@]}"; do | ||
[ -z "${cmd}" ] && continue | ||
echo "::: execute \"${cmd}\"" | ||
${cmd} | ||
done | ||
done <<< $(echo "${CMDL}") | ||
fi | ||
|
||
echo "<=- ${NAME} done" | ||
done < "${EXTCONF}" | ||
|
||
popd | ||
|