mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 18:08:33 +02:00

styling fix Added enum to promoted attribute definition parser Fix for the dropdown Added enumValues attr Added support for task note type Added support for swimlanes and swimlane dashboard Some minor fixes regarding swimlanes fixed a bug with ckeditor where pasting of links was not possible restructured folders folder-restructuring some more restructuring some folder restructuring fixes for file restructuring restored removed code Sorted the swimlane lists by priority sorting swimlanes and blinking based on priority Added new func for commenting on tasks fixed the workflow end to end fixed the workflow end to end Fixed the style for comments. Added the functionality for marking tasks as Done Added a file to track feature wish-list Added status back to the task header. Also added relevant tags to the node_tree. Fixed the status update on the note tree items. Also added deadline back Adding tags to the Swimlane dashboard Updating the dashboard view Fixed the tags on the swimlane dashboard items Fixed the hide/show for swimlane headers Updated the dashboard, added the collapse and expand feature. Also added deadline to the dashboard and tasks Prevented empty lines to be added as a comment. Also cleared task_deadline on a new task created Adding swimlane props Fixed the swimlane done/deprio, also added the subtasks for the tasks that have children fixed the grouping on swimlanes, added bucket type for the main parent of tasks, added swimlane options to dashboard type, fixed deadlines, updates to how swimlanes are populated Removed the db logs Updated fancytree lib to the latest version Updated gitignore Test adding an enum label type styling fix Added enum to promoted attribute definition parser Fix for the dropdown Added enumValues attr Added support for task note type Added support for swimlanes and swimlane dashboard Some minor fixes regarding swimlanes fixed a bug with ckeditor where pasting of links was not possible restructured folders folder-restructuring some more restructuring some folder restructuring fixes for file restructuring restored removed code Sorted the swimlane lists by priority sorting swimlanes and blinking based on priority Added new func for commenting on tasks fixed the workflow end to end fixed the workflow end to end Fixed the style for comments. Added the functionality for marking tasks as Done Added a file to track feature wish-list Added status back to the task header. Also added relevant tags to the node_tree. Fixed the status update on the note tree items. Also added deadline back Adding tags to the Swimlane dashboard Updating the dashboard view Fixed the tags on the swimlane dashboard items Fixed the hide/show for swimlane headers Updated the dashboard, added the collapse and expand feature. Also added deadline to the dashboard and tasks Prevented empty lines to be added as a comment. Also cleared task_deadline on a new task created Adding swimlane props Fixed the swimlane done/deprio, also added the subtasks for the tasks that have children all the updates as of Apr 24, 2024
103 lines
3.1 KiB
Bash
103 lines
3.1 KiB
Bash
#!/bin/bash
|
|
|
|
# Logger Function
|
|
log() {
|
|
local message="$1"
|
|
local type="$2"
|
|
local timestamp=$(date '+%Y-%m-%d %H:%M:%S')
|
|
local color
|
|
local endcolor="\033[0m"
|
|
|
|
case "$type" in
|
|
"info") color="\033[38;5;79m" ;;
|
|
"success") color="\033[1;32m" ;;
|
|
"error") color="\033[1;31m" ;;
|
|
*) color="\033[1;34m" ;;
|
|
esac
|
|
|
|
echo -e "${color}${timestamp} - ${message}${endcolor}"
|
|
}
|
|
|
|
# Error handler function
|
|
handle_error() {
|
|
local exit_code=$1
|
|
local error_message="$2"
|
|
log "Error: $error_message (Exit Code: $exit_code)" "error"
|
|
exit $exit_code
|
|
}
|
|
|
|
# Function to check for command availability
|
|
command_exists() {
|
|
command -v "$1" &> /dev/null
|
|
}
|
|
|
|
check_os() {
|
|
if ! [ -f "/etc/debian_version" ]; then
|
|
echo "Error: This script is only supported on Debian-based systems."
|
|
exit 1
|
|
fi
|
|
}
|
|
|
|
# Function to Install the script pre-requisites
|
|
install_pre_reqs() {
|
|
log "Installing pre-requisites" "info"
|
|
|
|
# Run 'apt-get update'
|
|
if ! apt-get update -y; then
|
|
handle_error "$?" "Failed to run 'apt-get update'"
|
|
fi
|
|
|
|
# Run 'apt-get install'
|
|
if ! apt-get install -y apt-transport-https ca-certificates curl gnupg; then
|
|
handle_error "$?" "Failed to install packages"
|
|
fi
|
|
|
|
mkdir -p /usr/share/keyrings
|
|
rm -f /usr/share/keyrings/nodesource.gpg
|
|
rm -f /etc/apt/sources.list.d/nodesource.list
|
|
|
|
# Run 'curl' and 'gpg'
|
|
if ! curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /usr/share/keyrings/nodesource.gpg; then
|
|
handle_error "$?" "Failed to download and import the NodeSource signing key"
|
|
fi
|
|
}
|
|
|
|
# Function to configure the Repo
|
|
configure_repo() {
|
|
local node_version=$1
|
|
|
|
arch=$(dpkg --print-architecture)
|
|
if [ "$arch" != "amd64" ] && [ "$arch" != "arm64" ] && [ "$arch" != "armhf" ]; then
|
|
handle_error "1" "Unsupported architecture: $arch. Only amd64, arm64, and armhf are supported."
|
|
fi
|
|
|
|
echo "deb [arch=$arch signed-by=/usr/share/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$node_version nodistro main" | tee /etc/apt/sources.list.d/nodesource.list > /dev/null
|
|
|
|
# N|solid Config
|
|
echo "Package: nsolid" | tee /etc/apt/preferences.d/nsolid > /dev/null
|
|
echo "Pin: origin deb.nodesource.com" | tee -a /etc/apt/preferences.d/nsolid > /dev/null
|
|
echo "Pin-Priority: 600" | tee -a /etc/apt/preferences.d/nsolid > /dev/null
|
|
|
|
# Nodejs Config
|
|
echo "Package: nodejs" | tee /etc/apt/preferences.d/nodejs > /dev/null
|
|
echo "Pin: origin deb.nodesource.com" | tee -a /etc/apt/preferences.d/nodejs > /dev/null
|
|
echo "Pin-Priority: 600" | tee -a /etc/apt/preferences.d/nodejs > /dev/null
|
|
|
|
# Run 'apt-get update'
|
|
if ! apt-get update -y; then
|
|
handle_error "$?" "Failed to run 'apt-get update'"
|
|
else
|
|
log "Repository configured successfully. To install Node.js, run: apt-get install nodejs -y" "success"
|
|
fi
|
|
}
|
|
|
|
# Define Node.js version
|
|
NODE_VERSION="18.x"
|
|
|
|
# Check OS
|
|
check_os
|
|
|
|
# Main execution
|
|
install_pre_reqs || handle_error $? "Failed installing pre-requisites"
|
|
configure_repo "$NODE_VERSION" || handle_error $? "Failed configuring repository"
|