diff --git a/bin/package b/bin/package index 80efc20..6c5a67d 100755 --- a/bin/package +++ b/bin/package @@ -22,15 +22,15 @@ pnpm run build tmpdir=$(mktemp -d) # Create plugin directory structure -mkdir -p "$tmpdir/$pluginname" -cp -r dist "$tmpdir/$pluginname" -cp package.json plugin.json main.py README.md LICENSE* "$tmpdir/$pluginname/" +mkdir -p "$tmpdir/$pluginname/$pluginname" +cp -r dist "$tmpdir/$pluginname/$pluginname" +cp package.json plugin.json main.py README.md LICENSE* "$tmpdir/$pluginname/$pluginname" # Copy binaries if provided if [ ${#binaryPaths[@]} -gt 0 ]; then - mkdir -p "$tmpdir/$pluginname/bin" + mkdir -p "$tmpdir/$pluginname/$pluginname/bin" for binaryPath in "${binaryPaths[@]}"; do - cp "$binaryPath" "$tmpdir/$pluginname/bin/" + cp "$binaryPath" "$tmpdir/$pluginname/$pluginname/bin/" done fi @@ -58,7 +58,7 @@ read -s -p "Enter the password for deck@${deckip}: " password output=$(sshpass -p "$password" scp "$zip_name" deck@"$deckip":/home/deck/Downloads) echo "$output" -output=$(sshpass -p "$password" ssh deck@${deckip} "set -e; echo '${password}' | sudo -S chmod -R ug+rw /home/deck/homebrew/; mkdir -p /home/deck/homebrew/pluginloader; mkdir -p /home/deck/homebrew/plugins/$pluginname; rm -rf /home/deck/homebrew/plugins/$pluginname/*; unzip /home/deck/Downloads/$zip_name -d /home/deck/homebrew/plugins/$pluginname; echo '${password}' | sudo -S systemctl restart plugin_loader") +output=$(sshpass -p "$password" ssh deck@${deckip} "set -e; echo '${password}' | sudo -S chmod -R ug+rw /home/deck/homebrew/; mkdir -p /home/deck/homebrew/pluginloader; echo '${password}' | sudo -S rm -rf /home/deck/homebrew/plugins/$pluginname; echo '${password}' | sudo -S unzip /home/deck/Downloads/$zip_name -d /home/deck/homebrew/plugins; echo '${password}' | sudo -S systemctl restart plugin_loader") echo "$output" if [ $? -ne 0 ]; then