Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dolibarr
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor 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
Software_Artifact_Infrastructure_Repository
dolibarr
Commits
5a2dfb38
Commit
5a2dfb38
authored
16 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
Prepare release
parent
25bd633c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dev/initdemo/initdemo.sh
+15
-12
15 additions, 12 deletions
dev/initdemo/initdemo.sh
with
15 additions
and
12 deletions
dev/initdemo/initdemo.sh
+
15
−
12
View file @
5a2dfb38
#!/bin/sh
#---------------------------------------------------
#------------------------------------------------------
# Script to purge and init a database with demo values.
# Note: "dialog" tool need to be available.
#
# Rgis Houssin - regis@dolibarr.fr
# Laurent Destailleur - eldy@users.sourceforge.net
#---------------------------------------------------
# WARNING: This script erase all data
base DATA
#---------------------------------------------------
#---------------------------------------------------
---
# WARNING: This script erase all data
of database
#---------------------------------------------------
---
DIALOG
=
${
DIALOG
=dialog
}
DIALOG
=
"
$DIALOG
--ascii-lines"
fichtemp
=
`
tempfile 2>/dev/null
`
||
fichtemp
=
/tmp/test
$$
trap
"rm -f
$fichtemp
"
0 1 2 5 15
$DIALOG
--title
"Purge de Dolibarr"
--clear
\
--inputbox
"
Nom de la base Mysql
:"
16 51 dolibarrdemo 2>
$fichtemp
--inputbox
"
Mysql database name
:"
16 51 dolibarrdemo 2>
$fichtemp
valret
=
$?
case
$valret
in
0
)
...
...
@@ -26,7 +29,7 @@ DIALOG=${DIALOG=dialog}
fichtemp
=
`
tempfile 2>/dev/null
`
||
fichtemp
=
/tmp/test
$$
trap
"rm -f
$fichtemp
"
0 1 2 5 15
$DIALOG
--title
"Purge de Dolibarr"
--clear
\
--inputbox
"
Compte Admin Mysql
(ex: root):"
16 51 2>
$fichtemp
--inputbox
"
Mysql usr login
(ex: root):"
16 51 2>
$fichtemp
valret
=
$?
...
...
@@ -43,7 +46,7 @@ DIALOG=${DIALOG=dialog}
fichtemp
=
`
tempfile 2>/dev/null
`
||
fichtemp
=
/tmp/test
$$
trap
"rm -f
$fichtemp
"
0 1 2 5 15
$DIALOG
--title
"Purge de Dolibarr"
--clear
\
--inputbox
"
Mot de passe du compte Admin Mysql
:"
16 51 2>
$fichtemp
--inputbox
"
Password for Mysql user admin
:"
16 51 2>
$fichtemp
valret
=
$?
...
...
@@ -60,7 +63,7 @@ DIALOG=${DIALOG=dialog}
fichtemp
=
`
tempfile 2>/dev/null
`
||
fichtemp
=
/tmp/test
$$
trap
"rm -f
$fichtemp
"
0 1 2 5 15
$DIALOG
--title
"Purge de Dolibarr"
--clear
\
--inputbox
"
Chemin complet du repertoire documents
(ex: /var/www/dolibarr/documents)-
pas de / la fin
:"
16 51 2>
$fichtemp
--inputbox
"
Full path to documents directory
(ex: /var/www/dolibarr/documents)-
no / at end
:"
16 51 2>
$fichtemp
valret
=
$?
...
...
@@ -74,14 +77,14 @@ exit;;
esac
# ---------------------------- confirmation
DIALOG
=
${
DIALOG
=dialog
}
$DIALOG
--title
"
Purge de
Dolibarr"
--clear
\
--yesno
"
Confirmez-v
ou
s
c
es i
nf
o
rm
ations
?
\n
base
Mysql : '
$base
'
\n
compte adm
in
: '
$admin
'
\n
mot de
pass
e
: '
$passwd
'
\n
rpertoire d
ocuments : '
$docs
'"
15 40
$DIALOG
--title
"
Init
Dolibarr
with demo values
"
--clear
\
--yesno
"
Do y
ou c
o
nf
i
rm ?
\n
Mysql
database
: '
$base
'
\n
Mysql log
in: '
$admin
'
\n
Mysql
pass
word
: '
$passwd
'
\n
D
ocuments
dir
: '
$docs
'"
15 40
case
$?
in
0
)
echo
"Ok,
dbut du
process
us
..."
;;
0
)
echo
"Ok,
start
process..."
;;
1
)
exit
;;
255
)
exit
;;
esac
# ---------------------------- run sql file
mysql
-u
$admin
-p
$passwd
$base
<
data_
demo.sql
mysql
-u
$admin
-p
$passwd
$base
<
init
demo.sql
This diff is collapsed.
Click to expand it.
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