Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
clarin-dspace
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
commul
docker
clarin-dspace
Commits
f4ec3869
Verified
Commit
f4ec3869
authored
4 years ago
by
egon w. stemle
Browse files
Options
Downloads
Patches
Plain Diff
Rm obsolete dspace-entrypoint.sh
parent
81196487
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dspace-entrypoint.sh
+0
-214
0 additions, 214 deletions
dspace-entrypoint.sh
with
0 additions
and
214 deletions
dspace-entrypoint.sh
deleted
100644 → 0
+
0
−
214
View file @
81196487
#!/bin/bash
#
# Wiki https://github.com/ufal/clarin-dspace/wiki/Installation
#
#
MAJOR
=
0
BUILD
=
2
VERSION
=
"
${
MAJOR
}
.
${
BUILD
}
"
#set -ex
# let's define some variables
export
DSPACE_INSTANCE_NAME
=
repository
export
DSPACE_SOURCE_DIRECTORY
=
/opt/repository/sources/dspace
export
DSPACE_WORKSPACE
=
/opt/repository/workspace
export
DSPACE_INSTALLATION_DIRECTORY
=
/opt/repository/installations
AAI_CONFIGFILE
=
"/opt/lindat-dspace/installation/webapps/xmlui/themes/UFAL/lib/js/aai_config.js"
DSPACE_CONFIGFILE
=
"
$DSPACE_WORKSPACE
/sources/local.properties"
#
# functions
#
_logger
()
{
MSG
=
$1
if
[
${
DEBUG
}
]
;
then
echo
-ne
"
${
MSG
}
"
# else
# echo -ne "${MSG}" >> ${LogFile}
fi
}
_loggerDate
()
{
_logger
"[
$(
date
)
]
$*
"
}
_exit
()
{
if
[
-z
$1
]
;
then
E_CODE
=
0
else
E_CODE
=
$1
fi
rm
-rf
${
TemporaryPath
}
_loggerDate
"Script completed
\n
"
exit
${
E_CODE
}
}
_printVersion
()
{
echo
"
${
BASENAME
}
version
${
VERSION
}
"
}
_printHelp
()
{
echo
"
${
BASENAME
}
"
echo
"Assembly some stuff, creating things..."
echo
echo
"Supported options:"
echo
" -d|--debug enable debug"
echo
" -V|--version report program version"
echo
" -h|--help print this help"
echo
}
_printComment
()
{
MSG
=
$1
echo
"<"
'!'
"--
${
MSG
}
-->"
}
_checkenv
()
{
set
-x
_loggerDate
"Checking env variables "
echo
$*
tot_args
=
$#
echo
$tot_args
count
=
0
while
[
"
$1
"
]
do
echo
"."
shift
((
count++
))
done
echo
$tot_args
$count
if
[
"
$tot_args
"
-ne
"
$count
"
]
;
then
exit
1
fi
set
+x
}
#
# main script
#
# argument parsing
while
[
$1
]
;
do
case
$1
in
-d
|
--debug
)
DEBUG
=
1
shift
;;
-V
|
--version
)
_printVersion
exit
0
;;
-h
|
--help
)
_printHelp
exit
0
;;
-t
|
--test
)
_notifyByIcingaPassiveCheck
exit
0
;;
*
)
_printHelp
exit
0
;;
esac
done
_loggerDate
"Starting
${
BASENAME
}
\n
"
_loggerDate
"Cloning lindat-dspace repository..."
if
[
!
-d
$DSPACE_SOURCE_DIRECTORY
]
then
_logger
"in
$DSPACE_SOURCE_DIRECTORY
\n
"
git clone https://github.com/ufal/lindat-dspace.git
-b
lindat
$DSPACE_SOURCE_DIRECTORY
else
_logger
"skip!
$DSPACE_SOURCE_DIRECTORY
already exists
\n
"
fi
cd
$DSPACE_SOURCE_DIRECTORY
/utilities/project_helpers
_loggerDate
"Creating workspace..."
if
[
!
-d
$DSPACE_WORKSPACE
]
then
_logger
"
$DSPACE_WORKSPACE
\n
"
./setup.sh /opt/repository/workspace
else
_logger
"skip!
$DSPACE_WORKSPACE
already exists
\n
"
fi
_loggerDate
"Copy makefile..."
if
[
!
-f
$DSPACE_WORKSPACE
/config/variable.makefile
]
then
cp
/tmp/commul-customization/variable.makefile
$DSPACE_WORKSPACE
/config/
_logger
"
$DSPACE_WORKSPACE
/config/variable.makefile
\n
"
else
_logger
"skip!
$DSPACE_WORKSPACE
/config/variable.makefile already exists
\n
"
fi
_loggerDate
"Copy local.properties..."
if
[
!
-f
$DSPACE_CONFIGFILE
]
then
set
-x
cp
/tmp/commul-customization/local.properties
$DSPACE_CONFIGFILE
set
+x
else
_logger
"skip!
$DSPACE_CONFIGFILE
already exists
\n
"
fi
_loggerDate
"Compilation and Deployment of DSpace..."
cd
$DSPACE_WORKSPACE
/scripts/
if
[
!
-f
$DSPACE_WORKSPACE
/scripts/install_libs.done
]
then
make install_libs
touch
$DSPACE_WORKSPACE
/scripts/install_libs.done
else
_logger
"already done
\n
"
fi
if
[
!
-f
$DSPACE_WORKSPACE
/scripts/fresh_install.done
]
then
make compile
make fresh_install
touch
$DSPACE_WORKSPACE
/scripts/fresh_install.done
else
_logger
"already done
\n
"
fi
if
[
!
-f
$DSPACE_WORKSPACE
/scripts/postinstall.done
]
then
make postinstall
touch
$DSPACE_WORKSPACE
/scripts/postinstall.done
_logger
"OK
\n
"
else
_logger
"already done
\n
"
fi
_loggerDate
"Copy aai_config.js..."
if
[
!
-f
$AAI_CONFIGFILE
]
then
set
-x
cp
/tmp/commul-customization/aai_config.js
$AAI_CONFIGFILE
set
+x
else
_logger
"skip!
$AAI_CONFIGFILE
already exists
\n
"
fi
_loggerDate
"Create dspace admin..."
if
[
!
-f
$DSPACE_WORKSPACE
/scripts/tomcatadmin.done
]
then
su tomcat8
-c
"/opt/lindat-dspace/installation/bin/dspace create-administrator"
touch
$DSPACE_WORKSPACE
/scripts/tomcatadmin.done
_logger
"OK
\n
"
else
_logger
"already done
\n
"
fi
_loggerDate
"Starting Tomcat..."
/etc/init.d/tomcat8 start
sleep
infinity
This diff is collapsed.
Click to expand it.
egon w. stemle
@egon.stemle
mentioned in commit
34c82519
·
4 years ago
mentioned in commit
34c82519
mentioned in commit 34c825191466a688aa651cd5c5a9f2b1271ffa04
Toggle commit list
egon w. stemle
@egon.stemle
mentioned in commit
3d10ef28
·
4 years ago
mentioned in commit
3d10ef28
mentioned in commit 3d10ef288ed3d8c6205d958613f8dce66f33b508
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment