Skip to content
Extraits de code Groupes Projets
Valider 1c3f4583 rédigé par Kubat's avatar Kubat
Parcourir les fichiers

Update install script

parent 30df2a04
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
working
stickerpicker/
#!/bin/bash
BASE_DIR="$PWD"
die() {
error $*
cd $PWD # Go to initial directory
exit 1
}
error() {
echo -ne '\e[31m'$*'\e[39m\n'
}
warn() {
echo -ne '\e[33m'$*'\e[39m\n'
}
info() {
echo -ne '\e[32m'$*'\e[39m\n'
}
# Clone the stickerpicker into the html repository
cd ~/html
git clone https://github.com/maunium/stickerpicker.git
cd ~/html >/dev/null 2>&1 \
|| warn "Could not cd to '~/html', will clone to '$PWD/stickerpicker'"
git clone https://github.com/maunium/stickerpicker.git stickerpicker \
|| die "Failed to git clone the stickerpicker project." \
"If you already installed stickerpicker, remove it or use the 'stpkg' command"
# Initialize the stickerpicker with the pack
# scalar-privacy_pam.json
cd stickerpicker
mv packs/* web/packs
cd web/packs
touch index.json
echo "{
\"homeserver_url\": \"https://matrix.iiens.net\",
\"packs\": [
\"scalar-privacy_pam.json\"
cd stickerpicker || die "Could not cd to '$PWD/stickerpicker'"
mv packs/* web/packs || die "Failed to cp packs to '$PWD/web/packs'"
cd web/packs || die "Failed to cd to '$PWD/web/packs'"
cat > index.json << EOF
{
"homeserver_url": "https://matrix.iiens.net",
"packs": [
"scalar-privacy_pam.json"
]
}
" >> index.json
echo "Created index.json in ~/html/stickerpicker/web/packs"
EOF
[ ! -f index.json ] && die "Failed to create the $PWD/index.json file"
info "Created index.json in '$PWD'"
# Go to initial directory
cd $BASE_DIR
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter