You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mkdir -p $BUILD_DIR/usr/bin || fatal "failed to create $BUILD_DIR/usr/bin"
66
69
67
-
# Check if the binary isn't named massastation. If it isn't, rename it to massastation.
68
-
if [ !-f$TMP_DIR/usr/local/bin/$MASSASTATION_BINARY_NAME ];then
69
-
mv $TMP_DIR/usr/local/bin/massastation_*$TMP_DIR/usr/local/bin/$MASSASTATION_BINARY_NAME|| fatal "failed to rename binary to $MASSASTATION_BINARY_NAME"
70
-
fi
71
-
cp $TMP_DIR/usr/local/bin/$MASSASTATION_BINARY_NAME$BUILD_DIR/usr/bin || fatal "failed to copy $MASSASTATION_BINARY_NAME to $BUILD_DIR/usr/bin"
70
+
# Find and copy the binary
71
+
BINARY_PATH=$(find $TMP_DIR -type f -name "$MASSASTATION_BINARY_NAME" -o -name "massastation_*"| head -1)
72
+
[ -z"$BINARY_PATH" ] && fatal "failed to find $MASSASTATION_BINARY_NAME binary in $TMP_DIR"
73
+
cp "$BINARY_PATH"$BUILD_DIR/usr/bin/$MASSASTATION_BINARY_NAME|| fatal "failed to copy $MASSASTATION_BINARY_NAME to $BUILD_DIR/usr/bin"
72
74
chmod +x $BUILD_DIR/usr/bin/$MASSASTATION_BINARY_NAME|| fatal "failed to make $MASSASTATION_BINARY_NAME executable"
73
75
74
76
mkdir -p $BUILD_DIR/usr/share/applications || fatal "failed to create $BUILD_DIR/usr/share/applications"
75
-
cp $TMP_DIR/usr/local/share/applications/net.massalabs.massastation.desktop $BUILD_DIR/usr/share/applications || fatal "failed to copy net.massalabs.massastation.desktop to $BUILD_DIR/usr/share/applications"
77
+
DESKTOP_PATH=$(find $TMP_DIR -type f -name "*.desktop"| head -1)
78
+
[ -z"$DESKTOP_PATH" ] && fatal "failed to find .desktop file in $TMP_DIR"
79
+
cp "$DESKTOP_PATH"$BUILD_DIR/usr/share/applications/net.massalabs.massastation.desktop || fatal "failed to copy .desktop file to $BUILD_DIR/usr/share/applications"
76
80
77
81
mkdir -p $BUILD_DIR/usr/share/pixmaps || fatal "failed to create $BUILD_DIR/usr/share/pixmaps"
78
-
cp $TMP_DIR/usr/local/share/pixmaps/net.massalabs.massastation.png $BUILD_DIR/usr/share/pixmaps || fatal "failed to copy net.massalabs.massastation.png to $BUILD_DIR/usr/share/pixmaps"
82
+
ICON_PATH=$(find $TMP_DIR -type f -name "*.png"| head -1)
83
+
[ -z"$ICON_PATH" ] && fatal "failed to find .png icon in $TMP_DIR"
84
+
cp "$ICON_PATH"$BUILD_DIR/usr/share/pixmaps/net.massalabs.massastation.png || fatal "failed to copy icon to $BUILD_DIR/usr/share/pixmaps"
79
85
80
86
mkdir -p $BUILD_DIR/usr/share/doc/massastation || fatal "failed to create $BUILD_DIR/usr/share/doc/massastation"
81
87
cp common/MassaStation_ToS.txt $BUILD_DIR/usr/share/doc/massastation/terms-and-conditions.txt || fatal "failed to copy MassaStation_ToS.txt to $BUILD_DIR/usr/share/doc/massastation/terms-and-conditions.txt"
0 commit comments