FAQ
| This is a
LIVE
service |
Changelog
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
gradint
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Silas S. Brown
gradint
Commits
f9d58b39
Verified
Commit
f9d58b39
authored
1 month ago
by
Silas S. Brown
Browse files
Options
Downloads
Patches
Plain Diff
GNU/Linux install script for multiuser + desktop menu entry
parent
fbd7292d
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
INSTALL.txt
+0
-49
0 additions, 49 deletions
INSTALL.txt
Makefile
+2
-1
2 additions, 1 deletion
Makefile
install.sh
+65
-0
65 additions, 0 deletions
install.sh
with
67 additions
and
50 deletions
INSTALL.txt
deleted
100644 → 0
+
0
−
49
View file @
fbd7292d
Installing Gradint on GNU/Linux systems
---------------------------------------
Gradint does not need to be installed, it can
just run from the current directory.
If you do want to make a system-wide installation
(for example if you want to make a package for a
GNU/Linux distribution), I suggest doing the
following as root:
mkdir /usr/share/gradint
cp gradint.py /usr/share/gradint/
cd samples/utils
for F in *.py *.sh; do
DestFile=/usr/bin/gradint-$(echo $F|sed -e 's/\..*//')
cp $F $DestFile
chmod +x $DestFile
done
cd ../.. ; rm -rf samples/utils
tar -zcf /usr/share/gradint/new-user.tgz \
advanced.txt settings.txt vocab.txt samples
cat > /usr/bin/gradint <<EOF
#!/bin/bash
if ! [ -e "$HOME/gradint" ]; then
echo "You will need some prompts and samples in your home directory."
echo "Is it OK to unpack an example into $HOME/gradint ?"
echo "Ctrl-C to quit or Enter to continue"
read
echo -n "Unpacking... "
mkdir "$HOME/gradint"
cd "$HOME/gradint"
tar -zxf /usr/share/gradint/new-user.tgz
echo "done."
echo "Please check the contents of $HOME/gradint"
echo "especially the README files."
echo "Then you can run gradint again."
exit
fi
cd "$HOME/gradint"
python /usr/share/gradint/gradint.py $@
EOF
chmod +x /usr/bin/gradint
For a distribution you might also have to write
man pages and tidy up the help text etc.
Depends: python + a sound player (e.g. alsa-utils)
Recommends: python-tk python-tksnack sox libsox-fmt-all madplay
This diff is collapsed.
Click to expand it.
Makefile
+
2
−
1
View file @
f9d58b39
...
...
@@ -28,7 +28,7 @@ EData := $(shell for N in $(Extra_Data); do if [ -e $$N ]; then echo $$N; fi; do
Common_Files
=
vocab.txt settings.txt advanced.txt samples
$(
EData
)
Most_Mac_Files
=
$(
Common_Files
)
gradint.py
Mac_Files
=
$(
Most_Mac_Files
)
mac/start-gradint.app
Linux_Files
=
$(
Common_Files
)
gradint.py
INSTALL.txt
Linux_Files
=
$(
Common_Files
)
gradint.py
install.sh
Riscos_Files
=
$(
Common_Files
)
gradint.py
CODE
=
src/lessonplan.py src/sequence.py src/loop.py src/booktime.py src/play.py src/synth.py src/makeevent.py src/filescan.py src/recording.py src/users.py
...
...
@@ -207,6 +207,7 @@ gradint.dmg: gradint-installer.command
gradint.bgz
:
$(Linux_Files)
mkdir
gradint
cp
-r
$(
Linux_Files
)
gradint
chmod
+x gradint/install.sh
tar
-c
gradint/ | bzip2
-9
>
gradint.bgz
rm
-rf
gradint
...
...
This diff is collapsed.
Click to expand it.
install.sh
0 → 100644
+
65
−
0
View file @
f9d58b39
#!/bin/bash
# Installing Gradint on GNU/Linux systems
# ---------------------------------------
# Gradint does not need to be installed, it can
# just run from the current directory.
# If you do want to make a system-wide installation
# (for example if you want to make a package for a
# GNU/Linux distribution), I suggest running as root
# the commands below.
# For a distribution you might also have to write
# man pages and tidy up the help text etc.
# Depends: python + a sound player (e.g. alsa-utils)
# Recommends: python-tk python-tksnack sox libsox-fmt-all madplay
# ---------------------------------------
set
-e
PREFIX
=
/usr/local
# or /usr
if
which python
;
then
PYTHON
=
python
;
else
PYTHON
=
python3
;
fi
mkdir
-p
"
$PREFIX
/share/gradint"
mv
gradint.py
"
$PREFIX
/share/gradint/"
cd
samples/utils
for
F
in
*
.py
*
.sh
;
do
DestFile
=
"
$PREFIX
/bin/gradint-
$(
echo
$F
|sed
-e
's/\..*//'
)
"
mv
"
$F
"
"
$DestFile
"
chmod
+x
"
$DestFile
"
done
cd
../..
;
rm
-rf
samples/utils
tar
-zcf
"
$PREFIX
/share/gradint/new-user.tgz"
\
advanced.txt settings.txt vocab.txt samples
cat
>
"
$PREFIX
/bin/gradint"
<<
'
EOF
'
#!/bin/bash
if ! [ -e "
$HOME
/gradint" ]; then
echo -n "Unpacking new user Gradint configuration... "
mkdir "
$HOME
/gradint"
cd "
$HOME
/gradint"
EOF
echo
" tar -zxf
\"
$PREFIX
/share/gradint/new-user.tgz
\"
"
>>
"
$PREFIX
/bin/gradint"
cat
>>
"
$PREFIX
/bin/gradint"
<<
'
EOF
'
echo "done."
fi
cd "
$HOME
/gradint"
EOF
echo
"
$PYTHON
\"
$PREFIX
/share/gradint/gradint.py
\"
"
'$@'
>>
"
$PREFIX
/bin/gradint"
chmod
+x
"
$PREFIX
/bin/gradint"
mkdir
-p
"
$PREFIX
/share/applications"
cat
>
"
$PREFIX
/share/applications/gradint.desktop"
<<
EOF
[Desktop Entry]
Type=Application
Name=Gradint
Comment=Graduated-interval recall
Exec=
$PREFIX
/bin/gradint
Categories=Education;Languages
EOF
echo
;
echo
"Installation complete."
echo
"To uninstall: sudo rm -rf
\"
$PREFIX
/bin/gradint
\"
\"
$PREFIX
/share/gradint
\"
"
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