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

Can now run install.sh multiple times, doing it will update the stickerpicker from repo

parent 1c3f4583
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -24,14 +24,24 @@ info() {
cd ~/html >/dev/null 2>&1 \
|| warn "Could not cd to '~/html', will clone to '$PWD/stickerpicker'"
if [ -d stickerpicker ]; then
# Fetch & rebase => update
info "The stickerpicker is already installed, update it"
LOCATION_OPT='--git-dir=stickerpicker/.git --work-tree=stickerpicker'
git $LOCATION_OPT fetch || die "Failed to fetch from sticker repo"
git $LOCATION_OPT rebase || die "Faield to rebase... what did you do to your master branch?"
else
# Install
info "The stickerpicker is not installed, install it 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"
fi
# Initialize the stickerpicker with the pack
# 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'"
cp 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
......@@ -47,5 +57,12 @@ EOF
info "Created index.json in '$PWD'"
STPKG_BASE=$BASE_DIR
STPKG_INSTALL=`realpath $PWD/../../`
info 'You may add the following lines in your bashrc file:'
echo "export STPKG_INSTALL='$STPKG_INSTALL'"
echo "export STPKG_BASE='$STPKG_BASE'"
# 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