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"
69
69
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"
70
+
# Check if the binary isn't named massastation. If it isn't, rename it to massastation.
71
+
if [ !-f$TMP_DIR/usr/local/bin/$MASSASTATION_BINARY_NAME ];then
72
+
mv $TMP_DIR/usr/local/bin/massastation_*$TMP_DIR/usr/local/bin/$MASSASTATION_BINARY_NAME|| fatal "failed to rename binary to $MASSASTATION_BINARY_NAME"
73
+
fi
74
+
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"
74
75
chmod +x $BUILD_DIR/usr/bin/$MASSASTATION_BINARY_NAME|| fatal "failed to make $MASSASTATION_BINARY_NAME executable"
75
76
76
77
mkdir -p $BUILD_DIR/usr/share/applications || fatal "failed to create $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"
78
+
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"
80
79
81
80
mkdir -p $BUILD_DIR/usr/share/pixmaps || fatal "failed to create $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"
81
+
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"
85
82
86
83
mkdir -p $BUILD_DIR/usr/share/doc/massastation || fatal "failed to create $BUILD_DIR/usr/share/doc/massastation"
87
84
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